We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a multi step form where I need to make a property required based on a selection in a previous step.
Thankfully the yup context got filled with the form values recently, but when using toTypedSchema the context does not seem to get provided anymore.
toTypedSchema
Here is the schema with when condition, in my code its placed inside an object():
id: number().when('$prevStep.isUpdate', ([isUpdate], schema) => { console.log({ isUpdate }); return isUpdate ? schema.required() : schema; });
Without toTypedSchema isUpdate is true/false depending on what the value is With toTypedSchema isUpdate is undefined
isUpdate
Vue.js 3.x and vee-validate 4.x
No demo
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What happened?
I have a multi step form where I need to make a property required based on a selection in a previous step.
Thankfully the yup context got filled with the form values recently, but when using
toTypedSchema
the context does not seem to get provided anymore.Here is the schema with when condition, in my code its placed inside an object():
Without
toTypedSchema
isUpdate
is true/false depending on what the value isWith
toTypedSchema
isUpdate
is undefinedReproduction steps
Version
Vue.js 3.x and vee-validate 4.x
What browsers are you seeing the problem on?
Relevant log output
Demo link
No demo
Code of Conduct
The text was updated successfully, but these errors were encountered: