fix: 字符校验修正 (#5761)

This commit is contained in:
John Bro 2024-07-11 14:41:24 +08:00 committed by GitHub
parent bcfbbb656a
commit a5bf435d2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -211,7 +211,7 @@ const checkImageName = (rule: any, value: any, callback: any) => {
if (value === '' || typeof value === 'undefined' || value == null) {
callback(new Error(i18n.global.t('commons.rule.imageName')));
} else {
const reg = /^[a-zA-Z0-9]{1}[a-z:A-Z0-9_/.-]{0,150}$/;
const reg = /^[a-zA-Z0-9]{1}[a-z:A-Z0-9_/.-]{0,149}$/;
if (!reg.test(value) && value !== '') {
callback(new Error(i18n.global.t('commons.rule.imageName')));
} else {