diff --git a/lib/validatable.js b/lib/validatable.js index 559b377e..2f09696e 100644 --- a/lib/validatable.js +++ b/lib/validatable.js @@ -143,11 +143,13 @@ Validatable.prototype.isValid = function (callback) { if (!async) { if (valid) cleanErrors(this); if (callback) callback(valid); + return valid; + } else { + // in case of async validation we should return undefined here, + // because not all validations are finished yet + return; } - - - return valid; }; function cleanErrors(inst) {