I have two input, one is the start number and the other is the end number. The start number is smaller than the end number. I see that the validator. can be customized on the antd official website. But there is a problem, for example, I added authentication to both input, but each authentication is only triggered when it is its own change, which leads me to change one. In fact, the verification is correct, but the other one is still error status.
what I want is a validation, which is triggered when either change of two input is triggered.
is a bit verbose. I hope you can read it.
<FormItem
validateStatus={endNumError ? "error" : ""}
help={endNumError || ""}
>
{getFieldDecorator("endNum", {
initialValue: "0",
rules: [
{ required: true, message: "" },
{ pattern: /^[0-9]*$/ , message: "" },
{ validator: this.validateReceiptNumber }
]
})(<Input placeholder="" />)}
</FormItem>