From 1c643a761de5e7f4593214ddb6123e864e526c66 Mon Sep 17 00:00:00 2001 From: huangdeliang Date: Wed, 9 Dec 2020 10:48:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=B8=AF=E6=BE=B3=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=E5=8F=B7=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- stdiet-ui/src/views/custom/signContract/index.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stdiet-ui/src/views/custom/signContract/index.vue b/stdiet-ui/src/views/custom/signContract/index.vue index 9e4bf990f..a1ed1a9b2 100644 --- a/stdiet-ui/src/views/custom/signContract/index.vue +++ b/stdiet-ui/src/views/custom/signContract/index.vue @@ -134,6 +134,7 @@ const checkPhone = (rule, value, callback) => { const phoneReg = /^1[3|4|5|6|7|8|9][0-9]{9}$/ + const hkPhoneReg = /^(5|6|8|9)\\d{7}$/ if (!value) { return callback(new Error('电话号码不能为空')) } @@ -143,7 +144,7 @@ if (!Number.isInteger(+value)) { callback(new Error('请输入数字值')) } else { - if (phoneReg.test(value)) { + if (phoneReg.test(value) || hkPhoneReg.test(value)) { callback() } else { callback(new Error('电话号码格式不正确'))