DEV Community

Discussion on: How to validate an email address in JavaScript

Collapse
 
darkain profile image
Vincent Milum Jr

Word of advice, never regex for an email address. Check out this article with a list of crazy yet valid email addresses.

hackernoon.com/the-100-correct-way...

Also, the assumption at the beginning about bounced emails isn't valid either. The server may send an unknown email address into a black hole (no bounce), whereas a valid known email address may bounce for reasons such as a full inbox or invalid contents of the mail being sent.

The closest thing you'll get is having the user click a link within the email. But also have the link in plain text as well in case the user agent strips out HTML.