commons-user mailing list archives

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

>Hello,
>
>I wonder how to validate domain names like "apache.org" or
>"jakarta.apache.org".
>

The URLValidator that was added to commons-validator you need a nightly 
build,
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.

-ROb

>
>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).
>
>Thanks,
>Andy
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
>
>  
>



Mime
View raw message