mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 08:19:15 +08:00
feat: 修改校验规则
This commit is contained in:
parent
2a1f317f99
commit
40e5dfaa11
@ -150,7 +150,7 @@ const checkParamCommon = (rule: any, value: any, callback: any) => {
|
||||
if (value === '' || typeof value === 'undefined' || value == null) {
|
||||
callback(new Error(i18n.global.t('commons.rule.paramName')));
|
||||
} else {
|
||||
const reg = /^[a-zA-Z0-9]{1}[a-zA-Z0-9._-]{6,30}$/;
|
||||
const reg = /^[a-zA-Z0-9]{1}[a-zA-Z0-9._-]{2,30}$/;
|
||||
if (!reg.test(value) && value !== '') {
|
||||
callback(new Error(i18n.global.t('commons.rule.paramName')));
|
||||
} else {
|
||||
|
@ -136,7 +136,7 @@ export default {
|
||||
domain: 'domain name format error',
|
||||
databaseName: 'Support English, numbers, _, length 1-30',
|
||||
ipErr: 'IP [{0}] format error, please check',
|
||||
paramName: 'Support English, numbers, .- and _, length 6-30',
|
||||
paramName: 'Support English, numbers, .- and _, length 2-30',
|
||||
paramComplexity: 'Support English, numbers, {0}, length 6-30',
|
||||
},
|
||||
res: {
|
||||
|
@ -141,7 +141,7 @@ export default {
|
||||
domain: '域名格式错误',
|
||||
databaseName: '支持英文、数字、_,长度1-30',
|
||||
ipErr: 'IP [{0}] 格式错误,请检查',
|
||||
paramName: '支持英文、数字、.-和_,长度6-30',
|
||||
paramName: '支持英文、数字、.-和_,长度2-30',
|
||||
paramComplexity: '支持英文、数字、{0},长度6-30',
|
||||
paramUrlAndPort: '格式为 http(s)://(域名/ip):(端口)',
|
||||
},
|
||||
@ -865,7 +865,7 @@ export default {
|
||||
installed: '已安装',
|
||||
all: '全部',
|
||||
version: '版本',
|
||||
detail: '应用详情',
|
||||
detail: '参数',
|
||||
install: '安装',
|
||||
author: '作者',
|
||||
source: '来源',
|
||||
|
Loading…
x
Reference in New Issue
Block a user