Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Space should be disallowed or at least treated consistently #37

Open
kscc25 opened this issue Jan 2, 2018 · 1 comment
Open

Space should be disallowed or at least treated consistently #37

kscc25 opened this issue Jan 2, 2018 · 1 comment

Comments

@kscc25
Copy link

kscc25 commented Jan 2, 2018

Tested with v3.0.1

Boolean(emailAddresses.parseOneAddress('myname @email.com'))
true
Boolean(emailAddresses.parseOneAddress('my [email protected]'))
false
@jackbearheart
Copy link
Owner

This is by the spec for email addresses (RFC 5322). You can read the spec and also the source of this parser to see how this works. You can also see the list of tests in test/tests.xml that cover some of these corner cases. Note that "my name"@email.com would be valid.

The spec isn't always what people expect, and it may not fit your use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants