I have a scenario I want subscribe
to accept true
, false
and empty string
''
how can I do this
const Register = Joi.object().keys({
company_id: Joi.string().required(),
subscribe: Joi.boolean()
});
subscribe: [Joi.boolean, Joi.string.max(0)]
As described in the github documentation.