13 ms·
Unless you are providing a user with an email account and need to ensure it's 100% valid, it's not worth doing anything but the most trivial validation. It's fa
by Gigachad 4y ago
Unless you are providing a user with an email account and need to ensure it's 100% valid, it's not worth doing anything but the most trivial validation. It's far better to allow an invalid email to be entered than disallow a valid one. The real validation is sending an email to it and the user opening that link. If they managed that, then it's a valid email.
- jancsika 4y agoHow about tiered validation: 1. I'll let you pass no questions asked: * gotta have that '@' sign * left of '@' sign must have greater than zero characters-- a-z, 0-9, dots are cool, plus whatever the rules are for international characters * right of '@' whatever the rules are for domains 2. Pay me $1.99 through stripe to continue whatever you're trying to do, every time you're trying to do it: * you've got double quotes, spaces, or other "actually, emails can contain..." bullshit in the local part of the addy