TanStackT
TanStack4mo ago
8 replies
exclusive-coral

how to validate with yup since yup is Standard Schema compatible?

in very short, if i pass yup.number() to a onChange field validator i get an error async function passed to sync validator.

i checked the ~standard prop of the schema and the validate prop is an async function. so it makes sense that the error is thrown since i see that the standardSchemaValidator checks this. but which is the right way to add the yup schema?
Was this page helpful?