Hacker News new | past | comments | ask | show | jobs | submit login

I like the HTML spec’s version, used for <input type=email> validation: https://html.spec.whatwg.org/multipage/input.html#valid-e-ma.... It allows all realistic inputs except for IP addresses (of dubious realism) and email address internationalisation (internationalised domain names are supported, but the local part is still currently stuck with ASCII, which is in keeping with its still-quite-limited support, though https://github.com/whatwg/html/issues/4562 progresses in fits and starts).



That's a good approach honestly.

I tend to just check for an @ and call it a day, validate it by emailing it and giving them a link to click if I need them to.

It's really the only way to ensure it's a valid and active address. People just don't want to build it.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: