In my application I'm using Yup validation. I faced a scenario where I need at least one of the three fields(String) required. I've tried using the below code but it is throwing Uncaught Error: Cyclic dependency, the node was: "b".
a: yup.string().when(['b', 'c'], {
is: (b, c) => !b && !c,
then: yup.string().required()
}),
b: yup.string().when(['a', 'c'], {
is: (a, c) => !a && !c,
then: yup.string().required()
}),
c: yup.string().when(['a', 'b'], {
is: (a, b) => !a && !b,
then: yup.string().required()
})
}, [['a', 'b'], ['a', 'c'], ['b','c']])```
Any response or working code would be very helpful. Thanks in advance.