commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Leland <>
Subject Re: validator: howto validate domain names
Date Thu, 05 Jun 2003 17:12:26 GMT
Andy Pahne wrote:

>I wonder how to validate domain names like "" or

The URLValidator that was added to commons-validator you need a nightly 
is a server side validation(Java). I believe that passing just a domain
will be accepted as valid. There is a JUnit test you can use as an example.

The Email validation also has a domain validation,
so the two could be broken out as a class.


>By the way: I am looking only for syntax validation. I'm not interested in
>DNS lookups to check, if the given domain exists.
>I have no idea how to create a regular expression that handles domains and
>subdomains (any level).
>To unsubscribe, e-mail:
>For additional commands, e-mail:

View raw message