1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 08:19:15 +08:00

feat: 修改校验规则

This commit is contained in:
zhengkunwang223 2023-03-02 13:35:06 +08:00 committed by ssongliu
parent 2a1f317f99
commit 40e5dfaa11
3 changed files with 4 additions and 4 deletions

View File

@ -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 {

View File

@ -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: {

View File

@ -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: '来源',