FR: make controlled reactive #4492
olegstepura
started this conversation in
Ideas
Replies: 1 comment
-
Here's more info on Conditional Validation, which is something I'd like to see supported on other Schema validators like Valibot (possibly coming soon): for Yup: Further discussion: |
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.
-
Hi!
I would like to propose a feature allowing
controlled
option to be reactive (or the wholeopts
parameter, similar torules
parameter ofuseForm
)Use case:
Imagine I have a form and I want to use
controlled
opt for a field to control whether this field should be validated or not.But this field only needs to be validated if some toggle is on. This other toggle is also a field.
So it would be nice to be able to write something similar to:
Email field itself can even be hidden in html if
emailOptIn
is unchecked. So the idea is:Thanks!
Beta Was this translation helpful? Give feedback.
All reactions