4 ms·
Guys after weeks of works I think I found the best way to validate emails. It's the regex below. /@/ But most of the times it's just overkill and you shouldn'
by dudus 13y ago
Guys after weeks of works I think I found the best way to validate emails. It's the regex below.
/@/
But most of the times it's just overkill and you shouldn't care.
It's free and you don't need mailgun or anything else.
You are welcome
- aytekin 13y agoThere is great wisdom in your joke. We have a web form builder service. (Jotform) We serve 3 million forms and process hundreds of thousands of submissions daily. Every form pretty much has an email question and most people enable validation feature. We first started with a very very smart and long email validation check that was going to be perfect. Every time users reported a case where our regular expression didn't envision we had to reduce it. During the years we had to change it so many times, I am pretty sure we have left with something like this: Does it have an @? Does it have a period? Great! You are validated!
- georgemcbay 13y ago"Does it have an @? Does it have a period? Great! You are validated!" Technically a period is not required, you can have an email address directly on a top-level domain. Though, of course, that is a rare enough use case that I'm sure anyone who has one has long since given up on expecting it to be validated correctly by most webforms.