Created
December 10, 2010 05:47
-
-
Save shameerc/735839 to your computer and use it in GitHub Desktop.
Simple email valiation
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
<?php | |
// This function uses simple filter_var function | |
// instead of regular expression to validate email | |
// @param string email Email address to be validated | |
function validateEmail($email) { | |
return filter_var($email, FILTER_VALIDATE_EMAIL); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment