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

The biggest argument for not validating email addresses shouldn't be that "it's hard". It should be that email providers don't always follow RFC guidelines. At my old job, we had this really weird bug that, after a lot of work, we tracked down to users who legitimately had greek letters in their email addresses.

If there are legitimate emails that don't follow RFC, you should absolutely allow users to enter non-RFC-compliant email addresses.




It's not hard, though. Anybody can go online and search for an email validating regex, but as some have pointed out, many are too strict and don't allow for, say, tagged email addresses ([email protected]). There's email validation, and there's overkill. That's what I was trying to get at.


The difficulty of writing regexes for email validation wasn't the main point - the main point was that emails don't follow spec so any regex based on that is inherently wrong. However, it seems like saying "most email validation regexes are broken" is equivalent to saying "email validation regex is hard"


They do most likely follow the standard, just a different standard than the one you're thinking of. E.g. RFC6530.




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

Search: