onBlur
validator hasn't been fired on leaving a field if it has multiple input tags
#918
Answered
by
Balastrong
arturasmckwcz
asked this question in
Q&A
-
It actually is fired upon submit event. this is sample code:
|
Beta Was this translation helpful? Give feedback.
Answered by
Balastrong
Aug 21, 2024
Replies: 1 comment 3 replies
-
For a radio button I'd probably go with an <input
name="certMeaslesVaccination"
type="radio"
onChange={() => field.handleChange(true)}
+ onBlur={field.handleBlur}
/>
<input
name="certMeaslesVaccination"
type="radio"
onChange={() => field.handleChange(false)}
+ onBlur={field.handleBlur}
/> |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
Balastrong
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For a radio button I'd probably go with an
onChange
validator, but in your specific case if you want Form to react to blur events you have to pass the handler to your input, like so: