Merge pull request #5022 from dataease/pr@dev@fix_user_phone-validate

fix(用户管理): 飞书同步的用户手机号无法通过DE表单验证
This commit is contained in:
fit2cloud-chenyw 2023-04-13 15:20:31 +08:00 committed by GitHub
commit a7c1769713
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 {