-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
bugBug or defectBug or defectfeatureNew functionality or improvementNew functionality or improvement
Milestone
Description
Why doesn't this work in my schema:
var schema = Joi.object().keys({
setting: Joi.alternatives().when('$auth.credentials.cond1', {
is: true,
then: Joi.number().integer().required().when('$auth.credentials.cond2', {
is: true,
then: Joi.invalid(100, 101)
}),
otherwise: Joi.forbidden()
})
});When $auth.credentials.cond1 is true, and setting is not provided in the input object, there is no validation error when there should be because it is required.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugBug or defectBug or defectfeatureNew functionality or improvementNew functionality or improvement