Explorar el Código

电话号码正则校验

郎学彬 hace 3 años
padre
commit
5a83c031ae
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      front-vue/src/views/system/company/index.vue

+ 1 - 1
front-vue/src/views/system/company/index.vue

@@ -549,7 +549,7 @@ export default {
         // ],
         scyPhone: [
           {
-            pattern: /^((\d{3}-\d{7,8}|\d{4}-\d{7,8})|(1[3465789]\d{9}))$/,
+            pattern: /^(\+?\d{2,4})?-?(\d{3,4})?-?\d{7,8}-?(\d{1,4})?$/,
             message: "电话格式不正确",
             trigger: "blur",
           }