Skip to content

Instantly share code, notes, and snippets.

@johanneslumpe
Created December 11, 2014 23:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johanneslumpe/10eaf4f0d55ee2f9132f to your computer and use it in GitHub Desktop.
Save johanneslumpe/10eaf4f0d55ee2f9132f to your computer and use it in GitHub Desktop.
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