From 7901b34c048fd02538793c8d9f02b4a4ab1d01d0 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Tue, 5 Aug 2025 17:27:18 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E7=B3=BB=E7=BB=9F=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E8=B4=A6=E5=8F=B7=E7=AE=80=E5=8D=954=E4=BD=8D=E9=95=BF?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/locales/en-US.ts | 4 ++-- src/i18n/locales/zh-CN.ts | 4 ++-- src/utils/regular-utils.ts | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) 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,}$/; /** * 有效密码格式