Pike v8.0 release 1738

Method NetUtils.valid_domain_name()


Method valid_domain_name

bool valid_domain_name(string hostname)

Description

Perform a basic sanity check on hostname based on total and subdomain label length. Does not test for invalid chars.

Parameter hostname

Domain name string to test.

Returns

True if hostname looks like a valid domain name