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

pull/4921/head
zhengkunwang 7 months ago committed by GitHub
parent b489f5cf2f
commit b01d8949cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -237,7 +237,7 @@ const checkSupervisorName = (rule: any, value: any, callback: any) => {
if (value === '' || typeof value === 'undefined' || value == null) { if (value === '' || typeof value === 'undefined' || value == null) {
callback(new Error(i18n.global.t('commons.rule.supervisorName'))); callback(new Error(i18n.global.t('commons.rule.supervisorName')));
} else { } 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 !== '') { if (!reg.test(value) && value !== '') {
callback(new Error(i18n.global.t('commons.rule.supervisorName'))); callback(new Error(i18n.global.t('commons.rule.supervisorName')));
} else { } else {

Loading…
Cancel
Save