I have been using jquery validate plugin http://bassistance.de/jquery-plugins/jquery-plugin-validation/. It has been working successfully, though now I have a form with a ta
Thim's answer will do the trick, here is slight modified version of it. Basically, replacing elements method from jquery validate plugin with the below code will surely improve timing if you're having what too many input fields to validate.
elements: function() {
var ret = [];
var form = $(this.currentForm);
for (var inputName in this.settings.rules) {
var inputs = form.find("input[name='" + inputName + "'], select[name='" + inputName + "'], textarea[name='" + inputName + "']");
if (inputs.length > 0) {
ret.push(inputs[0]);
}
}
/*You can comment below code if you're adding required rules explicitly*/
var _required = form.find(".required");
for (var i = 0; i < _required.length ; i++)
ret.push(_required[i]);
/*if you don't do this, you may encounter an error*/
return $(ret).map(function () {
return this;
});
}