TanStackT
TanStack6mo ago
21 replies
technical-ivory

Better handle for conditional fields with error

Currently it's very cumbersome to use conditional fields, since there's no convenient way to handle errors on them.

For example in 99% of the cases we want behavior like this:
When all visible (mounted) fields are valid, despite some of the hidden fields have errors, it is considered a valid state.

But currently the hidden field's error count as invalid state.

Maybe changing the default behavior to ignore hidden field's error or adding option toFormOptions that determines if the form is valid/submittable or not might help?
Was this page helpful?