Return valid in case of sync validations
This commit is contained in:
parent
c5019ef354
commit
be17763eca
|
@ -400,6 +400,8 @@ Validatable.prototype.isValid = function (callback, data) {
|
||||||
// in case of async validation we should return undefined here,
|
// in case of async validation we should return undefined here,
|
||||||
// because not all validations are finished yet
|
// because not all validations are finished yet
|
||||||
return;
|
return;
|
||||||
|
} else {
|
||||||
|
return valid;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -60,7 +60,7 @@ describe('validations', function() {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe.only('lifecycle', function() {
|
describe('lifecycle', function() {
|
||||||
|
|
||||||
it('should work on create', function(done) {
|
it('should work on create', function(done) {
|
||||||
User.validatesPresenceOf('name');
|
User.validatesPresenceOf('name');
|
||||||
|
|
Loading…
Reference in New Issue