commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 23990] New: - EmailValidator - valid email address fails
Date Wed, 22 Oct 2003 05:50:35 GMT
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: commons-dev@jakarta.apache.org
        ReportedBy: vsr77@yahoo.com


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>someone@yahoo.com<B>,

the output from isValid() method always returns <B>FALSE</B>.

2. For an email address with IP address like <B>someone@216.109.118.76<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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message