*@foo.com is a valid address, which your test doesn't check. And _ is not valid in a domain name, which will pass your test. etc...
I'm sure some one has already posted this question before, maby you should search before asking next time.
The poster should have. And you should have made sure your regex would actually make sure the email address is valid. It will fail on *@foo.com, which is a valid address, and pass on foo@foo_bar.com (which has a valid format, but couldn't possibly be a valid address).
Best advice is to use Email::Valid, with MX host checking. Without it, it will also miss-pass on things like foo@foo_bar.com (well formed, yes.. valid.. no). Checking the MX host will curb that.
Cheers,
KM | [reply] |
| [reply] |