DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23990>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23990

EmailValidator - valid email address fails

           Summary: EmailValidator - valid email address fails
           Product: Commons
           Version: Nightly Builds
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Validator
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I just downloaded the head version (1.10) of <I>EmailValidator.java</I> from 
http://cvs.apache.org/...

1. For a valid email address with symbolic name like <B>[EMAIL PROTECTED]<B>, 
the output from isValid() method always returns <B>FALSE</B>.

2. For an email address with IP address like <B>[EMAIL PROTECTED]<B>, the 
ouput from isValid() method always returns <B>FALSE</B>.

NB: 216.109.118.76 is one of yahoo's mirror ip address.

When I looked at the code, I figured out the following points:
1. In the method isValidSymbolicDomain(), the matcher uses ATOM_PATTERN instead 
of DOMAIN_PATTERN. For eg, <B>yahoo.com</B> is a valid DOMAIN_PATTERN but not a 
valid ATOM_PATTERN as per the regular expressions used for those strings.

2. In the method isValidDomain(), the check for <B>symbolic</B> variable should 
be inside the "else block" as symbolic will always be "false" for domains that 
matches IP_DOMAIN_PATTERN.

After modifying the code in the above two places, isValid() method returns true 
for the above metioned email addresses.

Thanks
Srirajesh

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

Reply via email to