Skip to content

Instantly share code, notes, and snippets.

@simon-p-r
Last active August 29, 2015 14:17
Show Gist options
  • Save simon-p-r/49d907d55a5fee3a218c to your computer and use it in GitHub Desktop.
Save simon-p-r/49d907d55a5fee3a218c to your computer and use it in GitHub Desktop.
Joi example
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