fix: 测试报告模版名称特殊字符检查
This commit is contained in:
parent
c9b312600a
commit
df2a6af6a4
|
@ -219,12 +219,16 @@
|
|||
});
|
||||
},
|
||||
handleSave() {
|
||||
let pattern = new RegExp("[`~!@#$^&*=|{}':;',<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]");
|
||||
if (this.template.name == null || this.template.name == '') {
|
||||
this.$warning(this.$t('test_track.plan_view.input_template_name'));
|
||||
return;
|
||||
} else if (this.template.name.length > 64) {
|
||||
this.$warning(this.$t('commons.name') + this.$t('test_track.length_less_than') + '64');
|
||||
return;
|
||||
} else if (pattern.test(this.template.name)) {
|
||||
this.$warning(this.$t('test_track.plan_view.template_special_characters'));
|
||||
return;
|
||||
}
|
||||
let param = {};
|
||||
this.buildParam(param);
|
||||
|
|
|
@ -602,6 +602,7 @@ export default {
|
|||
component_library_tip: "Drag and drop the component from the component library, add to the right, preview the report effect, only one can be added per system component.",
|
||||
delete_component_tip: "Please reserve at least one component",
|
||||
input_template_name: "Input template name",
|
||||
template_special_characters: 'Template name does not support special characters',
|
||||
case_count: "Case count",
|
||||
issues_count: "Issues count",
|
||||
result_statistics: "Result statistics",
|
||||
|
|
|
@ -602,6 +602,7 @@ export default {
|
|||
component_library_tip: "拖拽组件库中组件,添加至右侧,预览报告效果,每个系统组件只能添加一个。",
|
||||
delete_component_tip: "请至少保留一个组件",
|
||||
input_template_name: "输入模版名称",
|
||||
template_special_characters: '模版名称不支持特殊字符',
|
||||
case_count: "用例数",
|
||||
issues_count: "缺陷数",
|
||||
result_statistics: "测试结果统计",
|
||||
|
|
|
@ -601,6 +601,7 @@ export default {
|
|||
component_library_tip: "拖拽組件庫中組件,添加至右側,預覽報告效果,每個系統組件只能添加壹個。",
|
||||
delete_component_tip: "請至少保留壹個組件",
|
||||
input_template_name: "輸入模版名稱",
|
||||
template_special_characters: '模版名稱不支持特殊字符',
|
||||
case_count: "用例數",
|
||||
issues_count: "缺陷數",
|
||||
result_statistics: "測試結果統計",
|
||||
|
|
Loading…
Reference in New Issue