Merge pull request #780 from bestony/add-gmail-support

fix: Support plus in email address
This commit is contained in:
joyqi 2018-09-07 10:55:49 +08:00 committed by GitHub
commit df7aeda761
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -209,7 +209,7 @@ class Typecho_Validate
*/
public static function email($str)
{
return preg_match("/^[_a-z0-9-\.]+@([-a-z0-9]+\.)+[a-z]{2,}$/i", $str);
return preg_match("/^[_a-z0-9-\.+]+@([-a-z0-9]+\.)+[a-z]{2,}$/i", $str);
}
/**