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

The local part should not contain leading or trailing dots in the EMAIL_REGEXP #124

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

Conversation

nlevchuk
Copy link

@nlevchuk nlevchuk commented Nov 7, 2024

First of all, I'd like to thank all the contributors for their time and effort.

Recently, I've noticed that the EMAIL_REGEXP constant fails to handle a situations where there are leading or trailing dots in the local part of an email address. It's worth noting that while all major email providers permit the use of dots between characters, they prohibit their placement at the beginning or end of the local part.
I didn't find the exact information about the leading and trailing dots in the RFCs (5321, 5322). However, I believe it's practically useful to specify them in the regex.

Examples of an invalid email:

  • .hello@example.com
  • hello.@example.com

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

Successfully merging this pull request may close these issues.

1 participant