cookie添加增加格式验证

This commit is contained in:
whyour 2021-03-24 10:14:36 +08:00
parent 6648013c30
commit 3f2f165d72

View File

@ -59,7 +59,13 @@ const CookieModal = ({
<Form form={form} layout="vertical" name="form_in_modal">
<Form.Item
name="cookie"
rules={[{ required: true, message: '请输入Cookie' }]}
rules={[
{ required: true, message: '请输入Cookie' },
{
pattern: /[pt_pin=|pt_key=](.+?);[pt_pin=|pt_key=](.+?);/,
message: 'Cookie格式错误注意分号(pt_key=***;pt_pin=***;)',
},
]}
>
<Input.TextArea
rows={4}