Email validation (RegEx) #11601
Unanswered
inlinecoder
asked this question in
Q&A
Replies: 1 comment 2 replies
-
@inlinecoder You can try my pacakge |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello guys 👋,
Not sure if that's the right spot to ask. By reading the source, I've noticed that email validation is very bare-bones, not sure if that's intentional or a small over-sight.
payload/packages/payload/src/fields/validations.ts
Line 193 in 3de1636
From my understanding, it's:
--"[email protected]" (dot before @ is invalid)
-- "[email protected]" (double dots are invalid)
-- "[email protected]" (plus signs are valid)
-- "üñîçødé@example.com" (Unicode is valid in local parts, per RFC 6531)
Email validation is tricky. Even RFC 5322-compliant regexes are long and ugly.
Please let me know what you think and whether it should be converted into an issue.
Beta Was this translation helpful? Give feedback.
All reactions