Hi Andrey, Sorry but I think you're wrong. Domain != hostname. Underscore are allowed in domains (RFC 2181) but not in hostnames (RFC 1123 and next). To quote Wikipedia:
"While a hostname may not contain other characters, such as the underscore character (_), other DNS names may contain the underscore. Systems such asDomainKeys and service records use the underscore as a means to assure that their special character is not confused with hostnames. For example,_http._sctp.www.example.com specifies a service pointer for an SCTP capable webserver host (www) in the domain example.com." http://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names You can also see this StackOverflow answer http://stackoverflow.com/a/2183140/1352334 2014-11-06 0:32 GMT+01:00 Andrey Andreev <n...@devilix.net>: > Hi, > > On Wed, Nov 5, 2014 at 11:57 PM, Kévin Dunglas <dung...@gmail.com> wrote: > > > > - Added a new FILTER_VALIDATE_DOMAIN filter validating domain names > > - Added a FILTER_FLAG_HOSTNAME flag to allow checking hostnames (_ are > > forbidden in hostname but not in domains) > > This doesn't make any sense. A domain *is* a hostname and underscores > are forbidden. > > Cheers, > Andrey. > -- Kévin Dunglas Consultant et développeur freelance http://dunglas.fr Tél. : 06 60 91 20 20