[ 
https://issues.apache.org/jira/browse/VALIDATOR-359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ayoma Gayan Wijethunga updated VALIDATOR-359:
---------------------------------------------
    Attachment: VALIDATOR-359.patch

Domain part of the email address was validated with both "isValid(domain)" and 
"isValidTld(domain)".  

"isValidTld(domain)" validation was added to allow email addresses such as 
"test@com" (format for TLD users, described in 
http://tools.ietf.org/html/rfc5321#section-2.3.5). 

Issue occurred because isValidTld(domain) validates domains with a leading dot, 
which was not the expected result for scenario described in 
rfc5321#section-2.3.5.

Attached patch adds additional check for the mentioned scenario and also adds 
relevant test. In addition, "testEmailAtTLD" method which was available only in 
deprecated "EmailTest" class was moved to new "EmailValidatorTest", with 
additional comments on purpose of the test.

> EmailValidator does not catch invalid email address like [email protected]
> ------------------------------------------------------------------
>
>                 Key: VALIDATOR-359
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-359
>             Project: Commons Validator
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 1.4.1 Release
>         Environment: Java 1.7
>            Reporter: Dora Kinghorn
>         Attachments: VALIDATOR-359.patch
>
>
> EmailValidator does not catch invalid email address like [email protected]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to