Commit c9420624 authored by 皮倩雯's avatar 皮倩雯

fix: '修复网关配置关键字验证提示错误问题'

parent 3aa7902a
Pipeline #70136 passed with stages
......@@ -320,15 +320,15 @@ const AddModal = props => {
},
{
validator: (rule, value) => {
let aa = form.getFieldValue().Key;
if (!/^[^\u4e00-\u9fa5]{1,10}$/g.test(aa)) {
let val = form.getFieldValue().Key;
if (/[\u4E00-\u9FA5]/.test(val)) {
return Promise.reject('不允许输入中文');
}
if (type === 'edit') {
if (keepData.indexOf(aa) !== -1 && pickItem.key !== aa) {
if (keepData.indexOf(val) !== -1 && pickItem.key !== val) {
return Promise.reject('关键字已存在');
}
} else if (keepData.indexOf(aa) !== -1) {
} else if (keepData.indexOf(val) !== -1) {
return Promise.reject('关键字已存在');
}
......
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