You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Mathieu Neron (JIRA)" <ji...@apache.org> on 2016/05/10 15:35:13 UTC
[jira] [Created] (VALIDATOR-395) Email address with
leading/trailing space(s) are considered valid.
Mathieu Neron created VALIDATOR-395:
---------------------------------------
Summary: 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
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:
-" leading@space.com" expected to be invalid
-"trailing@space.com " 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 for 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)