<Form.Item
rules = {
[
{
required: true,
validator: (rule, val, callback)=>{
if(Number(val)<=0){
callback(new Error('不能小于0'));
} else {
callcack();
}
}
}
]
}
>
</Form.Item>
rules={[
flag ? ({
pattern:----,
messsge:'',
}) : ''
]}