previousField: yup.bool(), field: yup.string().test('required', 'please provide value', (value, ctx) => !ctx.parent.previousField)