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

Broken email regex #9

Open
RandalSchwartz opened this issue Jun 18, 2021 · 0 comments
Open

Broken email regex #9

RandalSchwartz opened this issue Jun 18, 2021 · 0 comments

Comments

@RandalSchwartz
Copy link

No, please don't use this so-called "regex email validation".

I can think of a few email addresses that are perfectly valid that do not match that regex. When you want to validate an email address, please do not use a hand-rolled (or even copy-n-pasted) regex.

Instead, use (Dart) https://pub.dev/packages/email_validator (or Perl) https://metacpan.org/pod/Mail::RFC822::Address, which properly implements the RFC822 (et. seq.) address according to the rules in the RFC.

(Jokingly...) Or, cut-n-paste this one (and only this one): http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html. Don't forget to remove the newlines from that 1400-char monster. :)

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

No branches or pull requests

1 participant