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')