[jQuery] Multipart form with Validate + Accordion Problem (validate)

[jQuery] Multipart form with Validate + Accordion Problem (validate)


Hi All,
I need some pointers on what I'm doing wrong here. I followed the
multipart form demo included with jquery.validate, creating a custom
validation rule like so:
<code>$.validator.addMethod("pageRequired", function(value, element) {
        var $element = $(element)
        function match(index) {
            return current == index && $(element).parents("#fields" + (index +
1)).length;
        }
        if (match(0) || match(1) || match(2) || match(3)) {
            return !this.optional(element);
        }
        return "dependency-mismatch";
    }, $.validator.messages.required)</code>
I wrap a #fieldsN div around the elements I am validating on a
specific page, like the multipart example does. Everything appears to
work, except one problem: after I validate the current page and move
onto the next one, the errors on the next page appear immediately. I
have tried to hide the errors without success. What am I doing wrong
here?
Here's the page:
http://iceant.com/qls/qls/accordion
Here's the javascript I'm using:
http://iceant.com/qls/js/custom/accordion.js
Any help would be greatly appreciated.