Skip to content
Browse files

Return valid in case of sync validations

  • Loading branch information...
1 parent c5019ef commit be17763ecadcba7a6395b23b9227505447b02bef @1602 committed Apr 1, 2013
Showing with 3 additions and 1 deletion.
  1. +2 −0 lib/validations.js
  2. +1 −1 test/validations.test.js
View
2 lib/validations.js
@@ -400,6 +400,8 @@ Validatable.prototype.isValid = function (callback, data) {
// in case of async validation we should return undefined here,
// because not all validations are finished yet
return;
+ } else {
+ return valid;
}
};
View
2 test/validations.test.js
@@ -60,7 +60,7 @@ describe('validations', function() {
});
- describe.only('lifecycle', function() {
+ describe('lifecycle', function() {
it('should work on create', function(done) {
User.validatesPresenceOf('name');

0 comments on commit be17763

Please sign in to comment.
Something went wrong with that request. Please try again.