feat: 修改校验规则

pull/184/head
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: '',