Last active
November 29, 2016 19:51
-
-
Save skoshy/6f76af85846e376ede8e668a74cdc46e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
/* | |
Using filter_var and check the domain part contains a dot | |
From http://www.electrictoolbox.com/php-email-validation-filter-var-updated/ | |
Check link for a series of tests | |
*/ | |
function emailValidate($email) { | |
return filter_var($email, FILTER_VALIDATE_EMAIL) && preg_match('/@.+\./', $email); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment