| There is a other email that the regexp lets pass and that’s still not valid: codetrotter@example.com It conforms to the expectated format and could be a valid email, but it’s actually not because no such user exists. An email might also exist, but not accept mail from you. The given email address might exist, by could belong to another user. There’s a million things that can go wrong and you’ll have a very hard time catching them. The only way to identify if an email is valid and accepts mail is to actually send an email there. You can, as a help for the user identify odd looking email addresses and flag them in the UI (“this looks unusual, are you sure”), but generally speaking, chances are high that any strict validation will reject real world addresses while not catching all errors. |
If you're going to test for at least 3 characters with a @ in the middle, you probably should implement some other simple rules to have a snowball's chance on the internet:
only one @
no spaces
has TLD (guarantee at least one period after @, and something else after, no consecutive periods)
can't begin or end with a period