joi nested objects
const schemaA = Joi.string()
const schemaB = Joi.object({ keyB1: schemaA, keyB2: Joi.number() })
const schemaC = Joi.object({
keyC1: Joi.string(),
keyC2: schemaB
})
Joi.validate({ keyC1: 'joi', keyC2: { keyB1: 'rocks!', keyB2: 3 } }, schemaC)