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

Email validation snippit matches improper emails as well #21

Open
HazemSayad opened this issue Jun 4, 2022 · 0 comments · May be fixed by #22
Open

Email validation snippit matches improper emails as well #21

HazemSayad opened this issue Jun 4, 2022 · 0 comments · May be fixed by #22
Labels
bug Something isn't working

Comments

@HazemSayad
Copy link
Contributor

Describe the bug
using the !valemail snippet: /[A-Z0-9._%+-]+@[A-Z0-9-]+.+.[A-Z]{2,4}/igm it matches normal emails fine, BUT it also matches commas and some other symbols. Examples: @gmail,com, @gmail?com, @gmail:com match

To Reproduce
Steps to reproduce the behavior:

  1. use the !valemail snippet: regex = !valemail
  2. "test@gmail:com".match(regex) matches

Expected behavior
It should not match unacceptable symbols as per email standards

Screenshots
image
above pic shows that the regex matches :com

image
above pic shows that the regex matches ?com

Additional context
during testing, i found that i was able to create weird emails, so i also checked with regexr.com to verify what's going on

@monizb monizb added the bug Something isn't working label Jun 5, 2022
@HazemSayad HazemSayad linked a pull request Jun 8, 2022 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants