There are entries in the antd form that need to be checked differently in change and blur. How to achieve this?

now I need to validate an entry in the antd form, checking different rules for change and blur

while using validateTrigger: ["onChange","onBlur"] will call the same check function in change and blur, and it is impossible to tell when

is called.

what I do now is
validateTrigger: ["onChange"],
rules: [{

]
validator: this.validator.bind(this)

}]
then check the blur in the onblur event of the input item, and manually go to setFields

.

one of the problems brought about by this is that when the form is submitted, when validateFieldsAndScroll is called, only the method defined by onChange will be verified, and the verification in onBlur needs to be called manually, which is very inconvenient

.

is there a great god to guide one or two?

Jul.14,2021
Menu