/ Published in: Other
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** * Validate email address * @param string $email Email address to validate * @return bool Returns TRUE if valid */ public static function validate($email) { return preg_match("/^[A-Za-z0-9_!#$%*/?|^{}`~&'+-=]+(.[A-Za-z0-9_!#$%*/?|^{}`~&'+-=]+)*@[A-Za-z0-9-]+(.[A-Za-z0-9-]+)*(.[A-Za-z0-9-]{2,6})$/", $email); }