1const schemaA = Joi.string()
2const schemaB = Joi.object({ keyB1: schemaA, keyB2: Joi.number() })
3const schemaC = Joi.object({
4 keyC1: Joi.string(),
5 keyC2: schemaB
6})
7
8Joi.validate({ keyC1: 'joi', keyC2: { keyB1: 'rocks!', keyB2: 3 } }, schemaC)
9