[
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 references above.
was (Author: rnicholus):
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