I have Tab1, Tab2 and Tab3…
All tabs have inputs that are validated …
My save method validates the required inputs:
var validator = $("form").validate(); // obtain validator
var anyError = false;
$('#tabs').find(":input").each(function ()
{
if (!validator.element(this)) { // validate every input element inside this step
anyError = true;
}
});
if (anyError)
return false; // exit if any error found
//save ...
Its working fine… But I´d like to select the first Tab that has an “error”… How can I do that?
Thanks
Untested but could you not do this:
Alternatively if you want all inputs to be checked regardless you could do something like this:
are either of those about what you are looking for?