-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
breaking changesChange that can breaking existing codeChange that can breaking existing codebugBug or defectBug or defect
Milestone
Description
I am not sure what's the right way of allowing undefined values in an array but the default should not be to allow it. It is rarely the desired or expected outcome.
it('errors on undefined value', function (done) {
var schema = Joi.object({
test: Joi.array().includes(Joi.number())
});
var input = { test: [undefined] };
schema.validate(input, function (err, value) {
expect(err).to.exist();
done();
});
});Reported in hapijs/hapi#2138
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
breaking changesChange that can breaking existing codeChange that can breaking existing codebugBug or defectBug or defect