This commit is contained in:
asp_ly 2024-12-14 21:58:36 +08:00
parent f0c964ea43
commit adb747f070

View File

@ -72,9 +72,27 @@ const EditModal: React.FC<EditModalProps> = ({visible, onClose, onSuccess, recor
<Form.Item <Form.Item
name="key" name="key"
label="流程标识" label="流程标识"
rules={[{required: true, message: '请输入流程标识'}]} rules={[
{ required: true, message: '请输入流程标识' },
{
pattern: /^[a-zA-Z_][a-zA-Z0-9_-]*$/,
message: '流程标识只能包含字母、数字、下划线(_)和连字符(-),且必须以字母或下划线开头'
},
{
pattern: /^(?!xml)/i,
message: '流程标识不能以xml开头不区分大小写'
},
{
pattern: /^[^.\s]*$/,
message: '流程标识不能包含空格和点号'
},
{
max: 64,
message: '流程标识长度不能超过64个字符'
}
]}
> >
<Input placeholder="请输入流程标识" disabled={isEdit}/> <Input placeholder="请输入流程标识,建议使用小写字母和下划线" disabled={isEdit}/>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
name="description" name="description"