You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

joi

Package Overview
Dependencies
Maintainers
2
Versions
238
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

joi - npm Package Compare versions

Comparing version

to
0.2.6

2

lib/types/base.js

@@ -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;

2

package.json
{
"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 = {