mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 08:19:15 +08:00
fix: 解决安装应用 数据库密码字段包含&$提示错误的问题 (#1809)
Refs https://github.com/1Panel-dev/1Panel/issues/1793
This commit is contained in:
parent
f000f8b46c
commit
01d5bd047f
@ -278,11 +278,11 @@ const checkParamCommon = (rule: any, value: any, callback: any) => {
|
|||||||
|
|
||||||
const checkParamComplexity = (rule: any, value: any, callback: any) => {
|
const checkParamComplexity = (rule: any, value: any, callback: any) => {
|
||||||
if (value === '' || typeof value === 'undefined' || value == null) {
|
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 {
|
} 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 !== '') {
|
if (!reg.test(value) && value !== '') {
|
||||||
callback(new Error(i18n.global.t('commons.rule.paramComplexity', ['.%@$!&~_-'])));
|
callback(new Error(i18n.global.t('commons.rule.paramComplexity', ['.%@!~_-'])));
|
||||||
} else {
|
} else {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user