-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
The code below (based on an example in the readme) prints "Fine..." when executed with node v0.10.12 and joi v1.2.1. I expected it to complain about a missing password field.
Is this the correct usage? Are the with/without constraints implemented as documented?
Thanks
var Joi = require('joi');
var schema = {
username: Joi.types.String().with('password'),
password: Joi.types.String().without('access_token')
};
var err = Joi.validate(
{username: 'bob'},
schema
);
if(err){
console.dir(err);
}
else {
console.log('Fine...');
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugBug or defectBug or defect