Explorar o código

手机号检测正则更新

laiguoran %!s(int64=5) %!d(string=hai) anos
pai
achega
6eab44b008
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      app/public/js/validate.extend.js

+ 1 - 1
app/public/js/validate.extend.js

@@ -9,7 +9,7 @@
 //检测手机号是否正确
 jQuery.validator.addMethod("mobile", function (value, element) {
     let length = value.length;
-    let regPhone = /^1([34578]\d)\d{8}$/;
+    let regPhone = /^1[3456789]\d{9}$/;
     return this.optional(element) || (length == 11 && regPhone.test(value));
 }, "请正确填写您的手机号码");