I came across this issue today. I realized that there was significant slowdown on one of my large lists. There is an option to view all, and in that view there is a form per line for deleting items. jquery.validate.unobtrusive
was destroying this page on load. When it was removed, the load was only 2s. Many of the forms needed no validation, but some still did. As a result, i looked in the code for the file and found this:
parse: function (selector) {
$(selector).find(":input[data-val=true]").each(function () {
$jQval.unobtrusive.parseElement(this, true);
});
$("form").each(function () {
var info = validationInfo(this);
if (info) {
info.attachValidation();
}
});
}
I realized that I would need to somehow alter that call, but still retain functionality. What I ended up doing was to mark all of my forms that I did not want to go through this parse method with class="skipValid"
. Then, in the source code, I made this change:
$("form:not(.skipValid)").each(function () {
and I had the best of both worlds.