I want the validation process to run when the bool variable I send with emit is false, how can I do this?
My isPhoneValid variable is where I hold the boolean value.
const schema = Yup.object().shape({
isPhoneValid2:isPhoneValid.value,
phoneValid2:Yup.string() .when(isPhoneValid.value , {
is: true,
then: Yup.string().required()
})
})