3 ms·
Sadly a number of sites get hung up on the '+', despite being valid. One thing to keep in mind if relying upon this.
by james-skemp 11y ago
Sadly a number of sites get hung up on the '+', despite being valid. One thing to keep in mind if relying upon this.
- jessaustin 11y agoIf they don't know how to email, they probably don't know how to security.
- chiph 11y agoTo be fair, checking that an email address is formatted correctly and valid is a challenge. You can't just use a regex.
- jessaustin 11y agoModern browsers use this one [0]: /^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/ That certainly accepts plus signs. I'm sure there are theoretically valid addresses it wouldn't accept (IDNs spring to mind), but HTML5 is willing to be "practically", rather than theoretically, correct. Anyway, there are email validation modules in every popular language. A good technique, which seems very common, is just to make the user type their email twice. Invalidity is not the most important reason why an address could cause problems. [0] https://www.w3.org/TR/html-markup/input.email.html https://www.w3.org/TR/html-markup/input.email.html