diff --git a/lib/validations.js b/lib/validations.js index 9568a057..102e04a6 100644 --- a/lib/validations.js +++ b/lib/validations.js @@ -344,9 +344,8 @@ function validateUniqueness(attr, conf, err, done) { this.constructor.find(cond, function (error, found) { if (error) { - return err(); - } - if (found.length > 1) { + err(error); + } else if (found.length > 1) { err(); } else if (found.length === 1 && (!this.id || !found[0].id || found[0].id.toString() != this.id.toString())) { err();