mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-01-07 07:34:26 +08:00
feat: 修改 supervisor 名称校验规则 (#4910)
This commit is contained in:
parent
b489f5cf2f
commit
b01d8949cb
1 changed files with 1 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue