Skip to content

Commit aeebc3b

Browse files
author
tom bertrand
committed
- Allow addError to be interpreted in the onValidate callback
1 parent 14d4ea4 commit aeebc3b

File tree

3 files changed

+26
-8
lines changed

3 files changed

+26
-8
lines changed

dist/jquery.validation.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Licensed under the MIT license
55
*
66
* @author Tom Bertrand
7-
* @version 1.5.3 (2015-07-08)
7+
* @version 1.5.3 (2015-07-16)
88
* @link http://www.runningcoder.org/jqueryvalidation/
99
*/
1010
;
@@ -362,7 +362,7 @@
362362

363363
function validateForm() {
364364

365-
var isValid = true;
365+
var isValid = isEmpty(errors);
366366

367367
formData = {};
368368

@@ -1459,7 +1459,7 @@
14591459
},
14601460
print: function() {
14611461

1462-
if ($.isEmptyObject(this.table)) {
1462+
if (isEmpty(this.table)) {
14631463
return false;
14641464
}
14651465

@@ -1491,6 +1491,15 @@
14911491
return this.charAt(0).toUpperCase() + this.slice(1);
14921492
};
14931493

1494+
function isEmpty(obj) {
1495+
for (var prop in obj) {
1496+
if (obj.hasOwnProperty(prop))
1497+
return false;
1498+
}
1499+
1500+
return true;
1501+
}
1502+
14941503
if (!Array.prototype.indexOf) {
14951504
Array.prototype.indexOf = function(elt) {
14961505
var len = this.length >>> 0;

0 commit comments

Comments
 (0)