Skip to content

Regex for email validation allows invalid emails #410

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

Closed
cwisdo opened this issue Nov 25, 2024 · 2 comments · Fixed by #411
Closed

Regex for email validation allows invalid emails #410

cwisdo opened this issue Nov 25, 2024 · 2 comments · Fixed by #411

Comments

@cwisdo
Copy link
Contributor

cwisdo commented Nov 25, 2024

In testing, I've found that:

validators.email("stephen @example.com") == True
validators.email("step;hen@example.com") == True

@yozachar
Copy link
Collaborator

yozachar commented Nov 29, 2024

@cwisdo it seems, spaces and ; a valid characters for an email's username part.

see: https://stackoverflow.com/questions/2049502/what-characters-are-allowed-in-an-email-address

There's a bug though. Only email address that start with s are allowed to have space.

@yozachar
Copy link
Collaborator

Closed in #411

@yozachar yozachar linked a pull request Mar 29, 2025 that will close this issue
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 a pull request may close this issue.

2 participants