feat: 修改 supervisor 名称校验规则 (#4910)

This commit is contained in:
zhengkunwang 2024-05-08 14:28:23 +08:00 committed by GitHub
parent b489f5cf2f
commit b01d8949cb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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