diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index cba4fafa..684f7e45 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -1692,8 +1692,8 @@ export default { loginIp: 'Login Address', loginTime: 'Login Time', status: 'Status', - userNameTip:'The account number can only contain strings of uppercase letters, lowercase letters and numbers with a minimum length of 6 digits', - passwdTip:'Please enter the correct password format', + userNameTip:'Please enter the correct username format no less than 4 digits', + passwdTip:'Please enter the correct password format no less than 6 digits', nickNameTip:'Nicknames no less than 2 digits', emailTip:'Please enter the correct email address', phoneTip:'Please enter the correct phone number', diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index 0eddc645..1a39215a 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -1692,8 +1692,8 @@ export default { loginIp: '登录地址', loginTime: '登录时间', status: '用户状态', - userNameTip:'账号只能包含大写字母、小写字母和数字的字符串,长度至少为6位', - passwdTip:'请输入正确的密码格式', + userNameTip:'请输入正确的用户名格式不少于4位', + passwdTip:'请输入正确的密码格式不少于6位', nickNameTip:'昵称不少于2位', emailTip:'请输入正确的邮箱地址', phoneTip:'请输入正确的手机号码', diff --git a/src/utils/regular-utils.ts b/src/utils/regular-utils.ts index 83f5b3fa..eabbc458 100644 --- a/src/utils/regular-utils.ts +++ b/src/utils/regular-utils.ts @@ -20,8 +20,9 @@ export const regExpPort = * 有效账号格式 * * 账号只能包含大写字母、小写字母和数字的字符串,长度至少为6位 + * /^[A-Za-z0-9]{6,}$/ */ -export const regExpUserName = /^[A-Za-z0-9]{6,}$/; +export const regExpUserName = /^.{4,}$/; /** * 有效密码格式