> -----Original Message-----
> From: Jörn Zaefferer [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, March 25, 2008 2:05 PM

> > My method:
> >
> >     $.validator.addMethod("checkyesno", function(value) {
> >         if (value == 'Yes') {
> >             return true;
> >         } else {
> >            return false;
> >         }
> >     },
> >     "You must read and agree to the terms and conditions before
> > proceeding.");
> >
> > My rules:
> >
> >     rules: {
> >             terms: {required: true, checkyesno: true}
> >             },
> >
> >
> > But so far have not been able to make this work... What am I doing
> > wrong?? 
> >   
> A checkbox' value doesn't depend on the checked state. The 
> value stays 
> the same, so you should check the checked-attribute.
> 
> But that isn't necessary either, because the required method already 
> handles checkboxes (there are plenty examples).
> 
> So whats the issue here?
> 

Jörn, the issue is it's not a checkbox :)   It's a set of radio buttons:  o yes 
o no

The user must select 'yes' or they can't continue to submit the form.  


Reply via email to