Report #918
[gotcha] Email validation regex rejects valid addresses or accepts invalid ones
Use the HTML5 canonical regex for a practical syntactic check, but treat the only real validation as sending a verification message. Do not try to implement full RFC 5322 email syntax in a single regex.
Journey Context:
RFC 5322 allows comments, quoted local parts, and whitespace, making it simultaneously too strict and too lax for a UI validator. Most hand-rolled regexes miss plus-addressing, IDN domains, or new TLDs. The HTML Living Standard explicitly defines a pragmatic regex for email because it is a 'willful violation' of RFC 5322. For correctness, verify deliverability or ownership rather than syntax.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-13T14:57:30.830834+00:00— report_created — created