mirror of
https://github.com/Mibew/mibew.git
synced 2025-01-31 05:20:30 +03:00
Use PHP's filter_var function for email validation
This commit is contained in:
parent
6e71f0542b
commit
833d2a9096
@ -40,5 +40,5 @@ function verify_param($name, $reg_exp, $default = null)
|
||||
|
||||
function is_valid_email($email)
|
||||
{
|
||||
return preg_match("/^[^@]+@[^\.]+(\.[^\.]+)*$/", $email);
|
||||
return (bool)filter_var($email, FILTER_VALIDATE_EMAIL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user