tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard M. Lewis Ship (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (TAP5-1347) Email Validation is not reliable
Date Fri, 02 Nov 2012 23:34:12 GMT

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

Howard M. Lewis Ship closed TAP5-1347.
--------------------------------------

    Resolution: Duplicate
      Assignee: Howard M. Lewis Ship
    
> Email Validation is not reliable
> --------------------------------
>
>                 Key: TAP5-1347
>                 URL: https://issues.apache.org/jira/browse/TAP5-1347
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Marcel Huber
>            Assignee: Howard M. Lewis Ship
>
> The Class org.apache.tapestry5.validator.Email a regex Pattern to validate a email address.
This Regex is not reliable! For instance a email address like: 1111111111111@1111111.1111111111111
OR steve.jobs@app- are become valid!
> I suggest to use the org.apache.commons.validator.EmailValidator.
> In the Class org.apache.tapestry5.validator.Email I overwrote the validate function like
this and the two email addresses are no more valid!
> import org.apache.commons.validator.EmailValidator;
> ......
>     public void validate(Field field, Void constraintValue, MessageFormatter formatter,
String value)
>             throws ValidationException
>     {
>     	EmailValidator ev = EmailValidator.getInstance();
>         if (!ev.isValid(value)) throw new ValidationException(buildMessage(formatter,
field));
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message