Skip to content

Commit

Permalink
Merge pull request #780 from bestony/add-gmail-support
Browse files Browse the repository at this point in the history
fix: Support plus in email address
  • Loading branch information
joyqi committed Sep 7, 2018
2 parents c2a71c2 + 2a8b11f commit df7aeda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion var/Typecho/Validate.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public static function maxLength($str, $length)
*/
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);
}

/**
Expand Down

0 comments on commit df7aeda

Please sign in to comment.