fix(用户管理): 飞书同步的用户手机号无法通过DE表单验证

This commit is contained in:
fit2cloud-chenyw 2023-04-13 15:05:54 +08:00
parent 7b9431231a
commit 6cb8e5923b

View File

@ -420,8 +420,11 @@ export default {
return
}
const regep = new RegExp(/^1[3-9]\d{9}$/)
if (!regep.test(value)) {
let phoneNumber = value
if (value.length > 3 && value.startsWith('+86')) {
phoneNumber = value.substr(3)
}
if (!regep.test(phoneNumber)) {
const msg = this.$t('user.phone_format')
callback(new Error(msg))
} else {