Created
December 11, 2014 23:02
-
-
Save johanneslumpe/10eaf4f0d55ee2f9132f to your computer and use it in GitHub Desktop.
joi config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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