fix: Support plus in email address

fix: add support in email address (just like example+typecho@gmail.com)
This commit is contained in:
Bestony 2018-09-06 10:54:42 +08:00 committed by GitHub
parent c2a71c2f19
commit 2a8b11f48b
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);
}
/**