From a484fc2329390b48693eda66b93fd0f3fa6d4973 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 7 Sep 2023 09:33:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=94=A8=E6=88=B7):=20=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E8=B4=A6=E5=8F=B7=E4=BB=A5=E6=95=B0=E5=AD=97=E5=BC=80=E5=A4=B4?= =?UTF-8?q?#5763?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/frontend/src/lang/en.js | 2 +- core/frontend/src/lang/tw.js | 2 +- core/frontend/src/lang/zh.js | 2 +- core/frontend/src/views/system/user/UserEditer.vue | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/frontend/src/lang/en.js b/core/frontend/src/lang/en.js index 60fbf8b68c..246d22dc03 100644 --- a/core/frontend/src/lang/en.js +++ b/core/frontend/src/lang/en.js @@ -669,7 +669,7 @@ export default { input_phone: 'Please enter the phone number', input_roles: 'Please select role', select_users: 'Please select user', - user_name_pattern_error: 'IDs can only contain alphanumeric and ._- and start with a letter!', + user_name_pattern_error: 'IDs can only contain alphanumeric and ._- and start with a letter or number!', special_characters_are_not_supported: 'Special characters are not supported', mobile_number_format_is_incorrect: 'Incorrect format of mobile phone number', email_format_is_incorrect: 'The mailbox format is incorrect', diff --git a/core/frontend/src/lang/tw.js b/core/frontend/src/lang/tw.js index d09ad5b60b..42cc8e2fa6 100644 --- a/core/frontend/src/lang/tw.js +++ b/core/frontend/src/lang/tw.js @@ -669,7 +669,7 @@ export default { input_roles: '請選擇角色', select_users: '請選擇用戶', select_gender: '請選擇性別', - user_name_pattern_error: 'ID只能包含字母数字以及._-并以字母开头!', + user_name_pattern_error: 'ID只能包含字母數字以及._-並以字母或數字開頭!', special_characters_are_not_supported: '不支持特殊字符', mobile_number_format_is_incorrect: '手機號碼格式不正確', email_format_is_incorrect: '郵箱格式不正確', diff --git a/core/frontend/src/lang/zh.js b/core/frontend/src/lang/zh.js index ec9e6a5618..a5f6e9ea4c 100644 --- a/core/frontend/src/lang/zh.js +++ b/core/frontend/src/lang/zh.js @@ -668,7 +668,7 @@ export default { input_roles: '请选择角色', select_users: '请选择用户', select_gender: '请选择性别', - user_name_pattern_error: 'ID只能包含字母数字以及._-并以字母开头!', + user_name_pattern_error: 'ID只能包含字母数字以及._-并以字母或数字开头!', special_characters_are_not_supported: '不支持特殊字符', mobile_number_format_is_incorrect: '手机号码格式不正确', email_format_is_incorrect: '邮箱格式不正确', diff --git a/core/frontend/src/views/system/user/UserEditer.vue b/core/frontend/src/views/system/user/UserEditer.vue index 86afa5428b..0df8edb408 100644 --- a/core/frontend/src/views/system/user/UserEditer.vue +++ b/core/frontend/src/views/system/user/UserEditer.vue @@ -432,7 +432,7 @@ export default { } }, validateUsername(rule, value, callback) { - const pattern = '^[a-zA-Z][a-zA-Z0-9\._-]*$' + const pattern = '^[a-zA-Z0-9][a-zA-Z0-9\._-]*$' const regep = new RegExp(pattern) if (!regep.test(value) && this.formType === 'add') { const msg = this.$t('user.user_name_pattern_error')