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('电话号码格式不正确'))