commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tan Quach <>
Subject EmailValidator string pattern
Date Tue, 13 Sep 2005 21:26:40 GMT
Hi all,

The EmailValidator declares a constant called 

String EMAIL_PATTERN = "/^(.+)@(.+)$/";

However, this pattern accepts the following email address as valid: 

hossa@good' <HYJDTYJ@FKHGSA>

As far as I know, the apostrophe is an invalid character for a domain name, 
and thus, the method EmailValidator.isValid() _should_ return false.

Have I missed something here, or is the EMAIL_PATTERN only validating and 
accepting RFC standard email addresses?

I have tried sending mail using the Java Mail API to an email address that 
was formed as above, and the server replied with 'malformed email address'. 

Any help is appreciated,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message