-
Notifications
You must be signed in to change notification settings - Fork 934
New issue
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
Error : branch is not function in version Yup 1.0 #2020
Comments
please read the docs, changelog, migration instructions, and try and search past issues before opening up new issues |
@anardil const schema = yup.object({
name: yup.string().label("Your name").when("checkbox", {
is: true,
then: schema => schema.required(),
otherwise: schema => schema.optional(),
}),
checkbox: yup.boolean().label("If checked put your name below"),
}); |
If its not clear, you need to use function notation for |
It works fine when I use Yup 0.32.11 but when I switched on version > 1.3. for Yup. help |
Hello,
I try to put conditional validation with Vee-validate and Quasar framework.
It works fine when I use Yup 0.32.11 but when I switched on version > 1.0 for Yup.
I got this error:
Uncaught (in promise) TypeError: branch is not a function
Here is the sanbox => https://codesandbox.io/s/vee-validate-v4-with-quasar-framework-forked-jc7mbk?file=/src/App.vue:0-1967. You will see the error.
But if you select in dependencies the version for Yup 0.32.11, it will works.
Someone can help please?
Thank you.
The text was updated successfully, but these errors were encountered: