validasi yup berdasarkan nilai bidang lain

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