Skip to content
Discussion options

You must be logged in to vote

Hey dude,

I'm no expert (just another user) but this does sound a little like a code smell.

Is the only reason for the nested forms to validate onChange instead of onSubmit? If so, then would it not make sense to manually call the validation on those fields manually as they change? I did something similar where I call trigger() on a single field based on when another one changes.

Either way, I feel like there's a better solution if you use a single form and try to control the parts of it, rather than nesting forms like this. It's not something I've seen in any of the examples.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@dan-cooke
Comment options

@bluebill1049
Comment options

@slugmandrew
Comment options

Answer selected by dan-cooke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants