Comparing version 0.2.5 to 0.2.6
@@ -407,2 +407,3 @@ // Load modules | ||
status = false; | ||
errors.add('not valid', keyPath); | ||
if (this.options.shortCircuit === true) { | ||
@@ -418,2 +419,3 @@ return status; | ||
status = false; | ||
errors.add('not valid', keyPath); | ||
if (this.options.shortCircuit === true) { | ||
@@ -420,0 +422,0 @@ return status; |
{ | ||
"name": "joi", | ||
"description": "Object schema validation", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"author": "Van Nguyen <the.gol.effect@gmail.com>", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
@@ -235,3 +235,16 @@ // Load modules | ||
it('should fail validation when missing a required parameter', function (done) { | ||
it('should fail validation when the wrong types are supplied', function (done) { | ||
var obj = { | ||
a: 'a', | ||
b: 'a', | ||
c: 'joe@example.com' | ||
}; | ||
var err = Joi.validate(obj, config); | ||
expect(err).to.exist; | ||
done(); | ||
}); | ||
it('should fail validation when missing a required parameter', function (done) { | ||
@@ -238,0 +251,0 @@ var obj = { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
281691
3076