diff --git a/lib/revalidator.js b/lib/revalidator.js index 58476b0..c14af04 100644 --- a/lib/revalidator.js +++ b/lib/revalidator.js @@ -384,7 +384,7 @@ nestedErrors.forEach(function (e) { e.property = property + '.' + e.property }); - nestedErrors.unshift(0, 0); + nestedErrors.unshift(errors.length, 0); Array.prototype.splice.apply(errors, nestedErrors); } break;