3 ms·
I recently launched a webpage without validation on the email field. 90% of the rows created in the database were not emails. I understand the point about not
by barrell 4y ago
I recently launched a webpage without validation on the email field. 90% of the rows created in the database were not emails.
I understand the point about not maintaining complex regex, but I just used an npm package that maintains and updates validation regexs with web standards. Besides any remaining left-pad jokes still standing, I don’t see why I would eschew this solution for any future forms?
- 3np 4y agoNot saying you shouldn't keep doing what works for you but: If visitors knowingly put invalid e-mail addresses 1) do you really need an e-mail address from them, rather than making the field optional? 2) If so, validation should be done by sending an e-mail with a validation link either way. As others pointed out, for a sanity-check something like /.+@.+/ should be good enough.