From 01d5bd047fb290fc8695e8c30ef7a888ed360d0a Mon Sep 17 00:00:00 2001 From: zhengkunwang <31820853+zhengkunwang223@users.noreply.github.com> Date: Wed, 2 Aug 2023 11:38:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E5=BA=94=E7=94=A8=20=E6=95=B0=E6=8D=AE=E5=BA=93=E5=AF=86?= =?UTF-8?q?=E7=A0=81=E5=AD=97=E6=AE=B5=E5=8C=85=E5=90=AB&$=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98=20(#1809?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs https://github.com/1Panel-dev/1Panel/issues/1793 --- frontend/src/global/form-rules.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/global/form-rules.ts b/frontend/src/global/form-rules.ts index c8dd9cf5b..be4ba7651 100644 --- a/frontend/src/global/form-rules.ts +++ b/frontend/src/global/form-rules.ts @@ -278,11 +278,11 @@ const checkParamCommon = (rule: any, value: any, callback: any) => { const checkParamComplexity = (rule: any, value: any, callback: any) => { if (value === '' || typeof value === 'undefined' || value == null) { - callback(new Error(i18n.global.t('commons.rule.paramComplexity', ['.%@$!&~_-']))); + callback(new Error(i18n.global.t('commons.rule.paramComplexity', ['.%@!~_-']))); } else { - const reg = /^[a-zA-Z0-9]{1}[a-zA-Z0-9.%@$!&~_-]{5,127}$/; + const reg = /^[a-zA-Z0-9]{1}[a-zA-Z0-9.%@!~_-]{4,126}[a-zA-Z0-9]{1}$/; if (!reg.test(value) && value !== '') { - callback(new Error(i18n.global.t('commons.rule.paramComplexity', ['.%@$!&~_-']))); + callback(new Error(i18n.global.t('commons.rule.paramComplexity', ['.%@!~_-']))); } else { callback(); }