-
i'm trying validade the form using mode: onBlur but, is not running as you can see in the sandbox here |
Beta Was this translation helpful? Give feedback.
Answered by
Moshyfawn
Jul 25, 2022
Replies: 1 comment 1 reply
-
You need to pass the field's <Controller
render={({ field }) => (
<input onBlur={field.onBlur} ref={field.ref} />
)}
/> |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
julio3266
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You need to pass the field's
onBlur
callback to your input's callback prop in order for RHF to register theonBlur
event + theref
callback. RHF doesn't do any magic behind the scenes to track the events, it's all user managed.