From 3625aa5ece4d47140d8d41ee34154d50d4ea0450 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=99=E7=A0=81=E7=94=9F=E8=8A=B1?= <18523774412@qq.com> Date: Tue, 29 Nov 2022 22:10:12 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=E4=BC=98=E5=8C=96=E8=B4=A6=E6=88=B7?= =?UTF-8?q?=E5=90=8D=E9=AA=8C=E8=AF=81=E9=94=99=E8=AF=AF=E6=97=B6=E7=9A=84?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/lang/pages/en/validate.ts | 4 ++-- web/src/lang/pages/zh-cn/validate.ts | 2 +- web/src/views/backend/auth/admin/popupForm.vue | 5 +---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/web/src/lang/pages/en/validate.ts b/web/src/lang/pages/en/validate.ts index 03fac2b4..17b833f8 100644 --- a/web/src/lang/pages/en/validate.ts +++ b/web/src/lang/pages/en/validate.ts @@ -1,7 +1,7 @@ export default { 'Please enter the correct mobile number': 'Please enter the correct mobile number', - 'Please enter the correct account': 'Please enter the correct account', - 'Please enter the correct password': 'The password requires 6 to 32 bits and cannot contain & < > " \'', + 'Please enter the correct account': 'The account requires 3 to 15 characters and contains a-z A-Z 0-9 _', + 'Please enter the correct password': 'The password requires 6 to 32 characters and cannot contains & < > " \'', 'Please enter the correct name': 'Please enter the correct name', 'Content cannot be empty': 'The content cannot be blank', 'Floating point number': ' Floating number', diff --git a/web/src/lang/pages/zh-cn/validate.ts b/web/src/lang/pages/zh-cn/validate.ts index 8d215bdf..3c534c67 100644 --- a/web/src/lang/pages/zh-cn/validate.ts +++ b/web/src/lang/pages/zh-cn/validate.ts @@ -1,6 +1,6 @@ export default { 'Please enter the correct mobile number': '请输入正确的手机号', - 'Please enter the correct account': '请输入正确的账户', + 'Please enter the correct account': '要求3到15位,字母开头且只含字母、数字、下划线', 'Please enter the correct password': '密码要求6到32位,不能包含 & < > " \'', 'Please enter the correct name': '请输入正确的名称', 'Content cannot be empty': '内容不能为空', diff --git a/web/src/views/backend/auth/admin/popupForm.vue b/web/src/views/backend/auth/admin/popupForm.vue index 0f9d3c65..c375015a 100644 --- a/web/src/views/backend/auth/admin/popupForm.vue +++ b/web/src/views/backend/auth/admin/popupForm.vue @@ -118,10 +118,7 @@ const baTable = inject('baTable') as baTableClass const { t } = useI18n() const rules: Partial> = reactive({ - username: [ - buildValidatorData({ name: 'required', title: t('auth.admin.username') }), - buildValidatorData({ name: 'account', message: t('Please enter the correct field', { field: t('auth.admin.username') }) }), - ], + username: [buildValidatorData({ name: 'required', title: t('auth.admin.username') }), buildValidatorData({ name: 'account' })], nickname: [buildValidatorData({ name: 'required', title: t('auth.admin.nickname') })], group_arr: [buildValidatorData({ name: 'required', message: t('Please select field', { field: t('auth.admin.grouping') }) })], email: [buildValidatorData({ name: 'email', message: t('Please enter the correct field', { field: t('auth.admin.mailbox') }) })],