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

Stricter unicode space check in email regex (with tests) #1316

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

vesquen
Copy link
Contributor

@vesquen vesquen commented Sep 3, 2024

Fixes Or Enhances

Updates email regex which no longer allows the following Unicode spaces:
U+0020 Space (SP)
U+00A0 No-Break Space (NBSP)
U+1680 Ogham Space Mark
U+2000 En Quad
U+2001 Em Quad
U+2002 En Space
U+2003 Em Space
U+2004 Three-Per-Em Space
U+2005 Four-Per-Em Space
U+2006 Six-Per-Em Space
U+2007 Figure Space
U+2008 Punctuation Space
U+2009 Thin Space
U+200A Hair Space
U+2028 Line Separator
U+202F Narrow No-Break Space (NNBSP)
U+205F Medium Mathematical Space (MMSP)
U+3000 Ideographic Space

They are still allowed when between quotes in the local part.

Make sure that you've checked the boxes below before you submit PR:

  • Tests exist or have been written that cover this particular change.

@go-playground/validator-maintainers

@vesquen vesquen requested a review from a team as a code owner September 3, 2024 15:14
@coveralls
Copy link

coveralls commented Sep 3, 2024

Coverage Status

coverage: 74.292% (+0.001%) from 74.291%
when pulling 5cdcd60 on Vesquen:stricter-unicode-space-check-in-email-regex
into a947377 on go-playground:master.

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.

2 participants