Skip to content

Instantly share code, notes, and snippets.

@johanneslumpe
Created December 11, 2014 23:02
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
joi config
Joi.object().required().keys({
referenceParentId : Joi.number().integer().when('isReference', {is: true, then: Joi.required(), otherwise: Joi.forbidden()}),
isReference : Joi.boolean().required()
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment