waynes schrieb:
Hi, I am using a variation of the multipage form in the demo and run into a
small problem with the pageRquired function. Seems it does not validate
correctly if you add any custom selectors after the pageRequired. I am
trying to make one field required depending on whether another field is
blank, eg: class="{pageRequired: '#field1:blank'}"
In this case, the validation is completely ignored, even if I have
{pageRequired:true}. It will only validate if I have class="pageRequired"
without the curly brackets. However, if I set it up in rules, it will make
the field2 required regardless of the value of field1, eg:
 $(document).ready(function(){
    $("#myform").validate({
  rules: {
    field2: {
      pageRequired: "#field1:blank"
    }
  }, debug:true
});

On a whole the multipage validation works very well but not with any custom
selectors such as :blank, :filled etc or by using curly brackets in the
class. Is there a way around this? I would really prefer to use inline
validation using class statements and still be able to use custom selectors.
The pageRequired implementation in the demo ignores the argument. Its just an example, please take a look at the code and the original implementation of the required method.

Jörn

Reply via email to