Przeglądaj źródła

后台手机号验证正则更新

laiguoran 5 lat temu
rodzic
commit
2c1646bf08
1 zmienionych plików z 1 dodań i 1 usunięć
  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;