below my code.
For some reason, the iscountrycode
is undefined
when I put it into the .when.
in the console.log
the result is 'BE'
export function getCheckoutFormSchema(t?: any, iscountryCode?: string) {`
console.log(iscountryCode)`
let schema = Yup.object().shape({`
zip: Yup.string()
.when(iscountryCode, {
is: 'BE',
then: Yup.string()`
Does anybody know why this is happening?