Skip to content

Commit

Permalink
修复手机号验证规则
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurunsoft committed May 6, 2024
1 parent 9bf8453 commit 4acefee
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 4acefee

Please sign in to comment.