Skip to content
Discussion options

You must be logged in to vote

Hi @cullsin

Here is an example:

<input
  name="test1"
  ref={
    register({
      validate: {
        asyncValidate: async value => await checkUserExist(value) // Returns either `true` if ok either a string if nok :`User doesn't exist`
      }
    })
  }
/>

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@cullsin
Comment options

Answer selected by bluebill1049
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants