How does antd achieve uniqueness verification when validating forms?

form verification needs to send a request to the background for uniqueness verification and real-time verification.

the current solution is to send a request in the onBlur of input.

but the experience is not good. Every time onBlur, the page will flash, and the next step may not be executed by onClick because onBlur is triggered, which needs to be clicked twice.

the solution that has been tried is setTimeout, but it doesn"t work.

the solution I have tried is to set a true/false, with mousehover and mouseout, to determine whether there is a next step when performing onBlur.
problem: if keyboard operation has many uncontrollable factors, it may affect the experience (it may not be as good as clicking twice);

is the conflict between onBlur and onSubmit/onClick a common problem?

Is there any good way to verify the uniqueness of the form?

No jquery based on react + antd

the registration page of Sina Weibo seems to be unique, but the registration page of Sina Weibo is simple and doesn"t seem to use a framework.


cannot postpone the verification. Do you submit it to the backend when the form submit


The Form component of

antd uses asyn-validator .
there is a validator validation to meet your needs.

  

release the version of the library you are using. I didn't encounter the problem you mentioned when using onblur

Menu