Browse Source

[Fix-14603] phone Number validate (#14604)

3.2.1-prepare
pppppjcc 1 year ago committed by GitHub
parent
commit
cbfb1cbffb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      dolphinscheduler-ui/src/views/security/user-manage/components/use-user-detail.ts

4
dolphinscheduler-ui/src/views/security/user-manage/components/use-user-detail.ts

@ -101,8 +101,10 @@ export function useUserDetail() {
},
phone: {
trigger: ['input', 'blur'],
required: false,
validator(validator: any, value: string) {
if (value && !/^1(3|4|5|6|7|8)\d{9}$/.test(value)) {
const regExp = new RegExp('^[1][3,4,5,6,7,8,9][0-9]{9}$')
if (value && !regExp.test(value)) {
return new Error(t('security.user.phone_correct_tips'))
}
}

Loading…
Cancel
Save