mirror of
https://github.com/1Panel-dev/1Panel
synced 2024-11-23 08:28:34 +00:00
feat: 数据库密码增加限制
This commit is contained in:
parent
ddd59cd5f4
commit
b27f42df58
@ -174,11 +174,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,29}$/;
|
||||
const reg = /^[a-zA-Z0-9]{1}[a-zA-Z0-9.%@$!&~_-]{5,29}$/;
|
||||
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();
|
||||
}
|
||||
|
@ -145,7 +145,8 @@ export default {
|
||||
ipErr: 'IP [{0}] format error, please check',
|
||||
numberRange: 'Number range: {0} - {1}',
|
||||
paramName: 'Support English, numbers, .- and _, length 2-30',
|
||||
paramComplexity: 'Support English, numbers, {0}, length 6-30',
|
||||
paramComplexity:
|
||||
'Support English, numbers, {0}, length 6-30,Special characters cannot be at the beginning and end',
|
||||
paramUrlAndPort: 'The format is http(s)://(domain name/ip):(port)',
|
||||
nginxDoc: 'Only supports English case, numbers, and .',
|
||||
appName: 'Support English, numbers, - and _, length 2-30, and cannot start and end with -_',
|
||||
|
@ -149,7 +149,7 @@ export default {
|
||||
ipErr: 'IP [{0}] 格式错误,请检查',
|
||||
numberRange: '数字范围: {0} - {1}',
|
||||
paramName: '支持英文、数字、.-和_,长度2-30',
|
||||
paramComplexity: '支持英文、数字、{0},长度6-30',
|
||||
paramComplexity: '支持英文、数字、{0},长度6-30,特殊字符不能在首尾',
|
||||
paramUrlAndPort: '格式为 http(s)://(域名/ip):(端口)',
|
||||
nginxDoc: '仅支持英文大小写,数字,和.',
|
||||
appName: '支持英文、数字、-和_,长度2-30,并且不能以-_开头和结尾',
|
||||
|
Loading…
Reference in New Issue
Block a user