Hey Jorn

ignore: ".checkbox :hidden" and ignore: ":hidden" - neither works for
me. I have also tried ignore: "#CoverAgreed_"

which didnt work. I wonder whether the underscore is recognized ?

I am validating it by giving ti a required rule like os -
'data[Cover][agreed]': {
                                       required:true
                                }

Is that the correct way to test a checkbox?

I must apologise as I posted another message esterday, as google
groups didnt show me my post had worked, even 30 minutes later!
thanks,

Luke
On Oct 29, 6:23 pm, "Jörn Zaefferer" <[EMAIL PROTECTED]>
wrote:
> Try to set ignore: ":hidden".
>
> Jörn
>
> On Wed, Oct 29, 2008 at 6:39 PM, luke BAKING barker
>
> <[EMAIL PROTECTED]> wrote:
>
> > hi
>
> > first, I want to say how cool this validation plugin is, very slick -
> > especially like the eager validation aspect.
>
> > I use CakePHP, and I am trying to check a "terms" box is checked, but
> > CakePHP outputs the HTML like so:
>
> > <div class="input checkbox">
> > <input id="CoverAgreed_" type="hidden" value="0" name="data[Cover]
> > [agreed]"/>
> > <input id="CoverAgreed" type="checkbox" value="1" name="data[Cover]
> > [agreed]"/>
> > <label for="CoverAgreed">do you agree to the terms?</label>
> > </div>
>
> > because of the names being identical, I have had difficulty getting
> > Validate to work and check that this second field is required. I know
> > it is not possible to use ID in rules: option of validate method. But
> > setting
>
> > rules: {
> >  "data[Cover][agreed]" : { required:true } will not work for me.
>
> > I have tried a workaround addressing the $(#CoverAgreed) . validate()
> > but could not be successful either. Any ideas for a workaround?
>
> > thank you in advance for any help you may be able to give
>
> > Luke

Reply via email to