How to trigger the validation on an input when the value of a related input changes? #5887
Unanswered
costinEEST
asked this question in
Show and tell
Replies: 1 comment
-
I think it may be worth sending a feature request with this, as it's been discussed multiple times. the relevant one here as well: #5597 I think the idea is passing down |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How to trigger the validation on the
confirmEmail
field, every time when the value of theemail
field changes?Here is a working solution - https://codesandbox.io/s/trigger-field-validation-when-related-field-value-changes-reacthookfom-s208q
Somehow I want to extract all the logic for the
<input />
in a reusable component (something which exposes theref
,onBlur
andonChange
plus some customprops
).Tried this - https://codesandbox.io/s/validate-field-when-other-one-changes-react-hook-form-e5vg4 without success.
Beta Was this translation helpful? Give feedback.
All reactions