[
https://issues.apache.org/jira/browse/VALIDATOR-302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14264124#comment-14264124
]
Sebb edited comment on VALIDATOR-302 at 11/5/15 4:18 PM:
---------------------------------------------------------
[2] above is referring to spaces between tokens is fields. It does not say
spaces are part of the fields.
[3] above says
{quote}
addr-spec = local-part "@" domain
local-part = dot-atom / quoted-string / obs-local-part
{quote}
None of the local-part options allow a space.
So I am inclined to agree that a space is not allowed in an email address
(unless the local-part is a quoted string).
In any case, leading spaces are not allowed.
was (Author: [email protected]):
[2] above is referring to sapces between tokens is fields. It does not say
spaces are part of the fields.
[3] above says
{quote}
addr-spec = local-part "@" domain
local-part = dot-atom / quoted-string / obs-local-part
{quote}
None of the local-part options allow a space.
So I am inclined to agree that a space is not allowed in an email address
(unless the local-part is a quoted string).
In any case, leading spaces are not allowed.
> EMailValidator: Addresses with leading spaces must not be accepted
> ------------------------------------------------------------------
>
> Key: VALIDATOR-302
> URL: https://issues.apache.org/jira/browse/VALIDATOR-302
> Project: Commons Validator
> Issue Type: Bug
> Components: Routines
> Reporter: Guido Zockoll
>
> @Test
> public void testEmailValidatorBug() {
> // The commons validator class accepts an address with an leading
> whitespace which seams to be a bug.
> boolean shouldBe = false;
> boolean isActual = true;
> String eMail = " [email protected]";
> logger.debug("{} is {}", eMail, validator.isValid(eMail) ? "valid" :
> "invalid");
> assertThat("Check failed for " + eMail, validator.isValid(eMail),
> is(isActual));
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)