4 ms·
The vast majority of common typos result in a syntactically valid email address anyway. A regex is just not an appropriate tool for email validation.
by bazoom42 3y ago
The vast majority of common typos result in a syntactically valid email address anyway. A regex is just not an appropriate tool for email validation.
- ceejayoz 3y ago"We can't catch all typos, so we won't catch any" is a silly approach to form validation. I can't check that 123-45-6789 is a valid Social Security Number, but I can still reject "FARTS". The same is true for "foo@gmailcom" for a public-internet facing contact us form.
- bazoom42 3y agoWhy not reject invalid top level domains then? This is going to catch a vastly larger amount of typos (including foo@gmailcom) without eliminating any valid emails.