Validating email address php ree adult personals dating site no hidden charges ever

05 Feb

An updated version incorporating many of the comments below has been released under an open source license as a Google Code project: php-email-address-validation.

Fortunately, PHP (5 and later) comes with a handy set of functions and filters that make testing for email address validity a snap.

FILTER_VALIDATE_EMAIL will erroneously balk at email addresses with long domain names (64 characters or more), and at email addresses with escaped characters (such as "me\"@example.com").

Now that you have your easy answer feel free to read on about email address validation if you care to learn or otherwise just use the fast answer and move on. Trying to validate an email address using a regex is an "impossible" task.

Many email address validators will actually throw up errors when faced with a valid, but unusual, email address.

Many, for example, assume that an email address with a domain name extension of more than three letters is invalid.