From 4194d8cca6e1e2f8eb232e07797e0086e2b4c526 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Mon, 8 Apr 2024 15:03:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=94=A8=E6=88=B7=E6=98=B5=E7=A7=B0?= =?UTF-8?q?=E5=92=8C=E6=89=8B=E6=9C=BA=E5=8F=B7=E6=AD=A3=E5=88=99=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E9=99=90=E9=95=BF=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/locales/en-US.ts | 2 +- src/i18n/locales/zh-CN.ts | 4 ++-- src/utils/regular-utils.ts | 4 ++-- src/views/system/user/index.vue | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index 478c9612..f0671002 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -1400,7 +1400,7 @@ export default { status: 'Status', userNameTip:'The account cannot start with a number and can contain uppercase and lowercase letters, numbers, and no less than 5 digits', passwdTip:'The password should contain at least uppercase and lowercase letters, numbers, special symbols, and no less than 6 digits', - nickNameTip:'Nicknames can only contain letters, numbers, Chinese characters, and underscores, with no less than 2 digits', + nickNameTip:'Nicknames no less than 2 digits', emailTip:'Please enter the correct email address', phoneTip:'Please enter the correct phone number', resetPwd:'Reset Password', diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index 782980e9..361405e4 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -265,7 +265,7 @@ export default { phonenumberPleace: "请输入正确的电子邮箱", nick: "用户昵称", nickPleace: "请输入用户昵称", - nickTip: "昵称只能包含字母、数字、中文和下划线,且不少于2位", + nickTip: "昵称少于2位", profileTip: "确认要提交修改用户基本信息吗?", profileOk: "用户基本信息修改成功!", know: "我知道了", @@ -1400,7 +1400,7 @@ export default { status: '用户状态', userNameTip:'账号不能以数字开头,可包含大写小写字母,数字,且不少于5位', passwdTip:'密码至少包含大小写字母、数字、特殊符号,且不少于6位', - nickNameTip:'昵称只能包含字母、数字、中文和下划线,且不少于2位', + nickNameTip:'昵称不少于2位', emailTip:'请输入正确的邮箱地址', phoneTip:'请输入正确的手机号码', resetPwd:'重置密码', diff --git a/src/utils/regular-utils.ts b/src/utils/regular-utils.ts index b006be79..fff43163 100644 --- a/src/utils/regular-utils.ts +++ b/src/utils/regular-utils.ts @@ -34,7 +34,7 @@ export const regExpPasswd = /** * 有效手机号格式 */ -export const regExpMobile = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/; +export const regExpMobile = /^.{3,}$/; // /^1[3|4|5|6|7|8|9][0-9]\d{8}$/; /** * 有效邮箱格式 @@ -47,7 +47,7 @@ export const regExpEmail = * * 用户昵称只能包含字母、数字、中文和下划线,且不少于2位 */ -export const regExpNick = /^[\w\u4e00-\u9fa5-]{2,}$/; +export const regExpNick = /^.{2,}$/; // /^[\w\u4e00-\u9fa5-]{2,}$/; /** * 是否为http(s)://开头 diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 39ced194..079f3e3f 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -1363,7 +1363,7 @@ onMounted(() => {