1
0
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:
2025-01-07 12:01:33 +08:00 committed by GitHub
parent 5f0c740eb0
commit 2392f91567
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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')));
} }