-
-
Save simon-p-r/49d907d55a5fee3a218c to your computer and use it in GitHub Desktop.
Joi example
This file contains hidden or 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
keys: Joi.alternatives().when('type', { | |
is: ['collection', 'record'], | |
then: Joi.array().items(Joi.object({ | |
name: Joi.string(), | |
flds: Joi.object(), | |
options: Joi.object() | |
})) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment