You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Ray Nicholus (JIRA)" <ji...@apache.org> on 2012/05/23 18:12:41 UTC

[jira] [Comment Edited] (TAP5-1933) Tapestry 5 email validator rules are not correct

    [ https://issues.apache.org/jira/browse/TAP5-1933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281196#comment-13281196 ] 

Ray Nicholus edited comment on TAP5-1933 at 5/23/12 4:12 PM:
-------------------------------------------------------------

We addressed this in our own project by using the following regex pattern (lifted from regular-expressions.info):

[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?

So, the Email validator class can be fixed by removing all of the regex patterns other than the PATTERN object, and then replacing the regex text in the PATTERN object with the one referenced above.
                
      was (Author: rnicholus):
    We addressed this in our own project by using the following regex pattern (lifted from regular-expressions.info):

[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?

So, the Email validator class can be fixed by removing all of the regex patterns other than the PATTERN object, and then replacing the regex text in the PATTERN object with the one references above.
                  
> Tapestry 5 email validator rules are not correct
> ------------------------------------------------
>
>                 Key: TAP5-1933
>                 URL: https://issues.apache.org/jira/browse/TAP5-1933
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3.3
>            Reporter: Ray Nicholus
>            Priority: Minor
>              Labels: validation
>
> Examples of currently allowed (and invalid) addresses: 
>   accent char - époch@example.com 
>   '+' in domain - test@foo+example.com 
>   '/' in domain - test@example/com 
>   wrapped in single quotes - '[hidden email]' 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira