I need to validate an array of input text elements (mileage): For example:
-
Using jquery validate 1.19.1 and modifying the jquery.validate.js file on line 465, replacing with this function should be fine.
checkForm: function() {
this.prepareForm();
for ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) {
var checkingElements = this.findByName( elements[i].name ).not(this.settings.ignore);
if (checkingElements.length !== undefined && checkingElements.length > 1) {
for (var cnt = 0; cnt < checkingElements.length; cnt++) {
this.check( checkingElements[cnt] );
}
} else {
this.check( elements[i] );
}
}
return this.valid();
},
I hope to be of help ;)
- 热议问题