Skip to content

how to validate only a part of zod schema? #11722

Closed Answered by sujinleeme
Flaain asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, @Flaain
Thanks for sharing this. We could reset values to trigger validation. Can you revisit this codesandbox and check again?

  const handleNext = () => {
    setActiveStep((prevActiveStep) => prevActiveStep + 1);
    reset({ ...getValues() });  // here
  };

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@Flaain
Comment options

@Flaain
Comment options

@sujinleeme
Comment options

Answer selected by Flaain
@Flaain
Comment options

@john093e
Comment options

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