Comparing version 0.3.2 to 0.3.3
@@ -70,3 +70,3 @@ // Load modules | ||
if (converted && keyConfig[i].validate(converted.value, key, object, errors, key)) { | ||
if (converted && keyConfig[i].validate(converted.value, object, key, errors, key)) { | ||
errors._values = errors._values.filter(errorFilter); | ||
@@ -82,3 +82,3 @@ return true; | ||
return converted && keyConfig.validate(converted.value, key, object, errors, key); | ||
return converted && keyConfig.validate(converted.value, object, key, errors, key); | ||
}; | ||
@@ -85,0 +85,0 @@ |
@@ -350,3 +350,3 @@ // Load modules | ||
internals.BaseType.prototype.validate = function (value, key, obj, errors, keyPath) { | ||
internals.BaseType.prototype.validate = function (value, obj, key, errors, keyPath) { | ||
@@ -353,0 +353,0 @@ var status = true; |
@@ -88,3 +88,3 @@ // Load modules | ||
if (typeof itemConfig.validate === 'function' && | ||
itemConfig.validate(value, key, itemConfig, errors, keyPath) === false) { | ||
itemConfig.validate(value, obj, key, errors, keyPath) === false) { | ||
@@ -91,0 +91,0 @@ return false; |
{ | ||
"name": "joi", | ||
"description": "Object schema validation", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"author": "Van Nguyen <the.gol.effect@gmail.com>", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
@@ -188,3 +188,12 @@ // Load modules | ||
T.String().nullOk() | ||
] | ||
], | ||
cache: T.Object({ | ||
mode: T.String().valid(['server+client', 'client+server', 'client', 'server']), | ||
segment: T.String(), | ||
privacy: T.String().valid('default', 'public', 'private'), | ||
expiresIn: T.Number().xor('expiresAt'), | ||
expiresAt: T.String(), | ||
staleIn: T.Number().with('staleTimeout'), | ||
staleTimeout: T.Number().with('staleIn') | ||
}).nullOk() | ||
}; | ||
@@ -194,2 +203,3 @@ | ||
expect(Joi.validate({ auth: { mode: 'required', payload: 'required' }, payload: 'raw' }, config)).to.be.null; | ||
expect(Joi.validate({ handler: internals.item, cache: { expiresIn: 20000, staleIn: 10000, staleTimeout: 500 } }, config)).to.be.null; | ||
done(); | ||
@@ -196,0 +206,0 @@ }); |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
286522
3186
0