Browse Source

后台手机号验证正则更新

laiguoran 5 năm trước cách đây
mục cha
commit
2c1646bf08
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      app.js

+ 1 - 1
app.js

@@ -45,7 +45,7 @@ module.exports = app => {
     // 自定义手机校验规则
     app.validator.addRule('mobile', (rule, value) => {
         try {
-            const regPhone = /^1([34578]\d)\d{8}$/;
+            const regPhone = /^1[3456789]\d{9}$/;
             const allowEmpty = rule.allowEmpty === true;
             if (allowEmpty && value === '') {
                 return true;