Explorar el Código

后台手机号验证正则更新

laiguoran hace 5 años
padre
commit
2c1646bf08
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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;