forked from github/dataease
Merge pull request #6050 from dataease/pr@dev@fix_user_account_format
fix(用户): 支持账号以数字开头#5763
This commit is contained in:
commit
691e24b17d
@ -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',
|
||||
|
@ -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: '郵箱格式不正確',
|
||||
|
@ -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: '邮箱格式不正确',
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user