V
Size: a a a
V
NF
V
V
NF
NF
NF

V
NF
NF
'timezone.mode': Yup.string().when(
['timezone.zoneId', 'timezone.fillBasedOnExternalIp'],
{
is: (val1, val2) => Boolean(val1) || Boolean(val2),
then: Yup.string().required('Не заполнено поле "timezone mode"'),
otherwise: Yup.string()
}
),
'timezone.zoneId': Yup.string().when(
['timezone.mode', 'timezone.fillBasedOnExternalIp'],
{
is: (val1, val2) => Boolean(val1) || Boolean(val2),
then: Yup.string().required('Не заполнено поле "timezone zoneId"'),
otherwise: Yup.string()
}
),
NF
V
NF
NF
V
V
NF

'timezone.mode': Yup.string().when(Оно на месте, однако всё равно выдаёт ошибку как будто его нет. Как будто в then оно не попадает
['timezone.zoneId', 'timezone.fillBasedOnExternalIp', 'timezone.mode'],
{
is: (val1, val2, mode) => {
console.log(Boolean(val1) || Boolean(val2), mode)
return Boolean(val1) || Boolean(val2);
},
then: Yup.string().required('Не заполнено поле "timezone mode"'),
otherwise: Yup.string()
}
),
V
NF