forked from github/dataease
fix(用户管理): 飞书同步的用户手机号无法通过DE表单验证
This commit is contained in:
parent
7b9431231a
commit
6cb8e5923b
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user