mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 00:09:16 +08:00
feat: Panel aliases support common special characters (#7654)
Refs #6909
This commit is contained in:
parent
5f0c740eb0
commit
2392f91567
@ -67,7 +67,7 @@ function checkPanelName(rule: any, value: any, callback: any) {
|
|||||||
if (value === '') {
|
if (value === '') {
|
||||||
return callback(new Error(i18n.global.t('setting.titleHelper')));
|
return callback(new Error(i18n.global.t('setting.titleHelper')));
|
||||||
}
|
}
|
||||||
const reg = /^[a-zA-Z0-9\u4e00-\u9fa5]{1}[a-zA-Z0-9_ .\u4e00-\u9fa5-]{2,29}$/;
|
const reg = /^[a-zA-Z0-9\u4e00-\u9fa5 .,:!@#%&^*_+[\]{}~\-=?,。!|?:;「」『』【】()《》·]{3,30}$/;
|
||||||
if (!reg.test(value)) {
|
if (!reg.test(value)) {
|
||||||
return callback(new Error(i18n.global.t('setting.titleHelper')));
|
return callback(new Error(i18n.global.t('setting.titleHelper')));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user