Skip to content

Commit 5da7eb8

Browse files
author
sihy
committed
修改数据服务api路径校验规则
1 parent 7211a92 commit 5da7eb8

File tree

1 file changed

+2
-2
lines changed
  • web/src/apps/dataService/module/dataService

1 file changed

+2
-2
lines changed

web/src/apps/dataService/module/dataService/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,11 @@ export default {
215215
};
216216
const validateAPIPath = (rule, value, callback) => {
217217
const result = value && value.trim();
218-
const reg = /^\/[\w_-]{3,199}$/g;
218+
const reg = /^[\w_-][\/\w_-]{3,199}$/g;
219219
if (!reg.test(result)) {
220220
callback(
221221
new Error(
222-
"支持英文、数字、下划线(_)、连字符(-),且只能以正斜线(/)开头,不超过200个字符,如/user"
222+
"支持英文、数字、下划线(_)、连字符(-)、正斜线(/),且不能以正斜线(/)开头,4到200个字符"
223223
)
224224
);
225225
} else {

0 commit comments

Comments
 (0)