Commit 74402c7a authored by 乔玉婷's avatar 乔玉婷

主题配置模板通道:通道名称、通道别名不能超过30个字符check

parent 30e78eff
Pipeline #2310 passed with stage
in 0 seconds
...@@ -195,6 +195,16 @@ export class CheckService { ...@@ -195,6 +195,16 @@ export class CheckService {
if ((data[eng] === '' || isUndefined(data[eng]) || data[eng] === null) && fieldStr.indexOf('-' + eng + '-') <= -1) { if ((data[eng] === '' || isUndefined(data[eng]) || data[eng] === null) && fieldStr.indexOf('-' + eng + '-') <= -1) {
return true; return true;
} }
if (eng == "name" && data.name.length > 30) {
this.message.warning(this.translate.instant(this.trans[eng]) + '不能超过30个字符!');
this.flag = 1;
return false
}
if (eng == "alias" && data.alias.length > 30) {
this.message.warning(this.translate.instant(this.trans[eng]) + '不能超过30个字符!');
this.flag = 1;
return false
}
const reg = new RegExp('^[a-zA-Z0-9]*$'); const reg = new RegExp('^[a-zA-Z0-9]*$');
if (reg.test(data[eng])) { if (reg.test(data[eng])) {
return true; return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment