Merge branch 'master' into production

production
钟良源 4 weeks ago
commit ab4a0e99cc

@ -97,6 +97,9 @@ const HandleModal = ({ visible, onChangeVisible, onRefresh }) => {
if (value.includes('**empty**')) { if (value.includes('**empty**')) {
return cb('非法事件标识,请重新输入'); return cb('非法事件标识,请重新输入');
} }
if (!/^[A-Za-z0-9_]+$/.test(value)) {
return cb('事件标识只能输入英文字母、数字和下划线');
}
return cb(); return cb();
} }
@ -323,4 +326,4 @@ const EventContainer = () => {
); );
}; };
export default EventContainer; export default EventContainer;

@ -151,6 +151,9 @@ const AddGlobalVarModal = ({ visible, onOk, onChangeVisible, form }) => {
if (!value) { if (!value) {
return cb('请填写变量名'); return cb('请填写变量名');
} }
if (!/^[A-Za-z0-9_]+$/.test(value)) {
return cb('变量名只能输入英文字母、数字和下划线');
}
return cb(); return cb();
} }
@ -254,4 +257,4 @@ const AddGlobalVarModal = ({ visible, onOk, onChangeVisible, form }) => {
); );
}; };
export default AddGlobalVarModal; export default AddGlobalVarModal;

Loading…
Cancel
Save