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

Disallow spaces for a TLD part #677

Merged
merged 7 commits into from
Jun 29, 2017

Conversation

IVikulin
Copy link
Contributor

I got the case, where user with an address "[email protected] m" was approved by the validator. Added checking for space symbols.

@profnandaa
Copy link
Member

@IVikulin - just fix the merge conflict on the .min file

@IVikulin
Copy link
Contributor Author

@profnandaa done

IVikulin added 2 commits June 28, 2017 12:56
Name                         | Hex       | JavaScript
------------------------------------------------------
space                          0x20        \s
en space                       0x2002      \u2002
em space                       0x2003      \u2003
three-per-em space             0x2004      \u2004
four-per-em space              0x2005      \u2005
six-per-em space               0x2006      \u2006
figure space                   0x2007      \u2007
punctuation space              0x2008      \u2008
thin space                     0x2009      \u2009
hair space                     0x200A      \u200A
zero width space               0x200B      \u200B
narrow no-break space          0x202F      \u202F
medium mathematical space      0x205F      \u205F
ideographic space              0x3000      \u3000
zero width no-break space      0xFEFF      \uFEFF
tag space                      0xE0020     \uDB40\uDC20
@IVikulin
Copy link
Contributor Author

Removed extra symbols from a space regex, now it works only for:

Name                         | Hex       | JavaScript
------------------------------------------------------
space                          0x20        \s
en space                       0x2002      \u2002
em space                       0x2003      \u2003
three-per-em space             0x2004      \u2004
four-per-em space              0x2005      \u2005
six-per-em space               0x2006      \u2006
figure space                   0x2007      \u2007
punctuation space              0x2008      \u2008
thin space                     0x2009      \u2009
hair space                     0x200A      \u200A
zero width space               0x200B      \u200B
narrow no-break space          0x202F      \u202F
medium mathematical space      0x205F      \u205F
ideographic space              0x3000      \u3000
zero width no-break space      0xFEFF      \uFEFF
tag space                      0xE0020     \uDB40\uDC20

@chriso
Copy link
Collaborator

chriso commented Jun 29, 2017

Thanks.

@chriso chriso merged commit 0d9ed49 into validatorjs:master Jun 29, 2017
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

Successfully merging this pull request may close these issues.

3 participants