¿Cuál es la mejor manera de hacer un condicional en Joi?
Me gustaría hacer:
if (a === 'Value1' || b === 'Value1') { // Check the length is less than 300 }Y tener esto hasta ahora...
{ a: Joi.string(), b: Joi.string(), c: Joi.string() .when('a', { is: Joi.valid('Value1'), then: Joi.string().max(300), }) .when('b', { is: Joi.valid('Value1'), then: Joi.string().max(300), }) .label('C label') }