DEV Community

Discussion on: JS: Check if an email is valid

Collapse
 
dwd profile image
Dave Cridland

I used to work for the team that designed MIXER, which gateways X.400 mail through to Internet Mail, so had to deal with horrors like "/C=GB/O=Isode Ltd/CN=Steve Kille"@mixer.isode.com and now can't even consider the concept of email address validation.

To add further confusion, that email address is not case-insensitive - the "local part" before the @-sign is case-sensitive, whereas the domain (as per RFC) can be case-folded safely.

And, of course, EAI makes everything even more confusing, with Unicode throughout.

As an interesting (possibly) aside, when the XMPP world borrowed the fundamental syntax of local@domain for its addresses (known as "Jids"), it didn't borrow all of the byzantine email syntax - instead it has canonicalization and normalization, and a highly restricted syntax - so restrictive it's actually as simple as most people's idea of email address syntax...