[
https://issues.apache.org/jira/browse/VALIDATOR-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15278420#comment-15278420
]
Sebb commented on VALIDATOR-395:
--------------------------------
RFC1034 is about domain names
RFC1123 is about internet hosts
I suspect you mean RFC822.
According to http://sphinx.mythic-beasts.com/~pdw/cgi-bin/emailvalidate,
leading and trailing spaces are allowed.
> Email address with leading/trailing space(s) are considered valid.
> ------------------------------------------------------------------
>
> Key: VALIDATOR-395
> URL: https://issues.apache.org/jira/browse/VALIDATOR-395
> Project: Commons Validator
> Issue Type: Bug
> Components: Routines
> Affects Versions: 1.5.1
> Reporter: Mathieu Neron
> Priority: Minor
> Fix For: 1.5.1
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> I recently replaced our custom email regex we were using in our project with
> org.apache.commons.validator.routines.EmailValidator, but it broke 2 of my
> cases in the unit tests I had written for it:
> -" [email protected]" expected to be invalid
> -"[email protected] " expected to be invalid
> Are those considered valid in RFC1034/RFC1123? If not, a simple fix would be
> to check for leading/trailing spaces at the same location were you check that
> the email doesn't end with a period, at line 162 or EmailValidator.java,
> since it's cheap as well.
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)