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

Ray Nicholus commented on TAP5-1933:
------------------------------------

We addressed this in our own project by using javax.mail's InternetAddress 
class to validate the email addresses.  We did have to manually check for 
addresses that end in quotes though since InternetAddress seems to think these 
are valid.  I'm guessing this is not an option for Tapestry as this would 
require Tap5 to depend on javax.mail.  

Another option for Tapestry would be to use 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])?
                
> 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 - é[email protected] 
>   '+' 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


Reply via email to