-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
featureNew functionality or improvementNew functionality or improvement
Milestone
Description
I have the following JSON objects:
{
"batch": false,
"name": "foobar"
}{
"batch": true,
"names": ["foo", "bar", "baz"]
}With the current implementation of Joi is it possible to make names required only if batch is true and not allowed if batch is false? Reading the docs I think no? But I'm asking because I might be missing something! :)
If not is it something that might be added to Joi or should I do that check "post validation"?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureNew functionality or improvementNew functionality or improvement