The correct answer is actually to use object.unknown(true).
object.unknown(true)
const schema = Joi.object().keys({ a: Joi.string().required(), b: Joi.string().required() }).unknown(true);
1.4m articles
1.4m replys
5 comments
57.0k users