手机号校验码-checkPhoneFormat-先校验手机区号是否是手机号前缀
This commit is contained in:
@@ -265,8 +265,11 @@ public class CommonUtil {
|
||||
}
|
||||
String realPhone = phone;
|
||||
if (realPhone.startsWith(areaCode)) {
|
||||
realPhone = realPhone.replaceFirst(areaCode, "");
|
||||
return false;
|
||||
}
|
||||
|
||||
realPhone = realPhone.replaceFirst(areaCode, "");
|
||||
|
||||
// 优先以配置的正则校验
|
||||
if (!CollectionUtils.isEmpty(SystemConfig.phoneRegex)) {
|
||||
String phoneRegex = SystemConfig.phoneRegex.get(areaCode);
|
||||
|
Reference in New Issue
Block a user