From 4140847f2dcc276b312cee3727322cc5d6d9d1c6 Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Sun, 13 Jul 2014 15:11:05 -0400 Subject: [PATCH] fix error message when extra properties are passed --- lib/validate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/validate.js b/lib/validate.js index 97cbbf6..fedef5e 100644 --- a/lib/validate.js +++ b/lib/validate.js @@ -218,7 +218,7 @@ var validate = exports._validate = function(/*Any*/instance,/*Object*/schema,/*O delete instance[i]; continue; } else { - errors.push({property:path,message:(typeof value) + "The property " + i + + errors.push({property:path,message:"The property " + i + " is not defined in the schema and the schema does not allow additional properties"}); } }