I think that Jeremy was on the right track! As the form expects a
field/column, then should the field not be named as ElectionOffice.id,
so that it points to a column in table!?
Maybe give it a try! You actually had the .id attached in your first
post!
Enjoy,
   John

On Apr 21, 8:44 pm, cricket <zijn.digi...@gmail.com> wrote:
> On Apr 21, 12:54 am, Jeremy Burns <jeremybu...@me.com> wrote:
>
> > Might it be something to do with the field name? What happens if you rename 
> > it to election_office?
>
> ElectionOffice is the model name.
>
> I got the error msg to show up properly, though. I debugged $form-
>
> >validationErrors:
>
> Array
> (
>     [Election] => Array
>         (
>             [ElectionOffice] => Please select at least one Office
>         )
>
> )
>
> So, $form->error('Election.ElectionOffice') does the trick.
>
> But it still won't save if an Office is selected but that validation
> rule is present. I can't figure out how to debug what's going on when
> that rule is encountered. The data comes in like:
>
> Array
> (
>     [ElectionOffice] => Array
>         (
>             [ElectionOffice] => Array
>                 (
>                     [0] => 1
>                     [1] => 2
>                     [2] => 3
>                     [3] => 4
>                     [4] => 5
>                 )
>         )
>     [Election] => Array
>         (
>             [deadline] => 2010-04-29
>         )
> )
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to