I wanted to put two conditions that if its isProduct or isBox is true, then product_id should be required. I did this code below and it isnt working
product_id: yup.string().when(['isProduct', 'isBox'], {
is: true,
then: yup.string().required('Select product'),
}),