Skip to content

Commit

Permalink
修复手机号验证规则 (#698)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurunsoft authored May 7, 2024
1 parent 0b6be46 commit f617a79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Validate/ValidatorHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public static function tel($str): bool
*/
public static function mobile($str): bool
{
return preg_match('/^(1(([35789][0-9])|(47)))\d{8}$/', (string) $str) > 0;
return preg_match('/^(\\+?0?86\\-?)?1[3456789]\\d{9}$/', (string) $str) > 0;
}

/**
Expand Down

0 comments on commit f617a79

Please sign in to comment.