Showing
1 changed file
with
10 additions
and
1 deletions
| @@ -176,8 +176,17 @@ export const formSchema: BFormSchema[] = [ | @@ -176,8 +176,17 @@ export const formSchema: BFormSchema[] = [ | ||
| 176 | field: 'name', | 176 | field: 'name', |
| 177 | label: '报表名称', | 177 | label: '报表名称', |
| 178 | colProps: { span: 24 }, | 178 | colProps: { span: 24 }, |
| 179 | - required: true, | ||
| 180 | component: 'Input', | 179 | component: 'Input', |
| 180 | + rules: [ | ||
| 181 | + { required: true, message: '请输入报表名称' }, | ||
| 182 | + { | ||
| 183 | + validator(_rule, value, _callback) { | ||
| 184 | + const reg = /[\/\\]/; | ||
| 185 | + if (reg.test(value)) return Promise.reject('报表名称中存在斜杠或反斜杠'); | ||
| 186 | + return Promise.resolve(); | ||
| 187 | + }, | ||
| 188 | + }, | ||
| 189 | + ], | ||
| 181 | componentProps: { | 190 | componentProps: { |
| 182 | maxLength: 64, | 191 | maxLength: 64, |
| 183 | placeholder: '请输入报表名称', | 192 | placeholder: '请输入报表名称', |