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
when
lazy
I received this error targetVal.concat is not a function at merge
targetVal.concat is not a function at merge
const creditCardSchema = yup.object().shape({ addressNumber: yup.lazy(val => { switch (typeof val) { case "number": return yup.number() default: return yup .string() .matches(/(S\/N)/i); } }) }); const paymentSchema = yup.object().shape({ creditCard: yup.object().when("paymentMethod", { is: "credit_card", then: creditCardSchema }), paymentMethod: yup.string().required() }); const checkoutSchema = yup.object().shape({ payment: paymentSchema }); checkoutSchema.validate({ payment: { paymentMethod: "credit_card" } }); // Throw errror targetVal.concat is not a function at merge
You can check online ... https://runkit.com/ridermansb/yup-error-when-lazy
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
I received this error
targetVal.concat is not a function at merge
You can check online ...
https://runkit.com/ridermansb/yup-error-when-lazy
The text was updated successfully, but these errors were encountered: