This is an automated email from the ASF dual-hosted git repository.
zhongjiajie pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new cbfb1cbffb [Fix-14603] phone Number validate (#14604)
cbfb1cbffb is described below
commit cbfb1cbffb84d717603fe36cc7a5bc03801d40f6
Author: pppppjcc <[email protected]>
AuthorDate: Thu Jul 20 20:39:54 2023 +0800
[Fix-14603] phone Number validate (#14604)
---
.../src/views/security/user-manage/components/use-user-detail.ts | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/dolphinscheduler-ui/src/views/security/user-manage/components/use-user-detail.ts
b/dolphinscheduler-ui/src/views/security/user-manage/components/use-user-detail.ts
index f095927a73..8472059cf3 100644
---
a/dolphinscheduler-ui/src/views/security/user-manage/components/use-user-detail.ts
+++
b/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'))
}
}