const schema = Joi.object({ bar: Joi.string(), foo: Joi.string() }).custom((obj, helpers) => { // you have access to the full object above. const { foo, bar } = obj; if (foo === "myfoo") { } });