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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]








--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to