On Apr 20, 11:33 pm, cricket <zijn.digi...@gmail.com> wrote:
> Oh, poop! Never mind, it works now. Sorry for the noise.
>

Poop, indeed. It's busted again. I had it working, but then saving
wasn't happening. Now I've got save() working, but this validation is
cocked up.

<?= $form->select(
        'ElectionOffice',
        $offices,
        null,
        array('multiple' => 'checkbox', 'checked' => true)
) ?>

<?= $form->error('ElectionOffice') ?>

Election model:
var $validate = array(
        'deadline' => array(
                'rule' => 'date',
                'required' => true,
                'allowEmpty' => false,
                'message' => 'You must declare a deadline date.'
        ),
        'ElectionOffice' => array(
                'rule' => array('multiple', array('min' => 1)),
                'required' => true,
                'message' => 'Please select at least one Office'
        )
);

If the 2nd rule is present, the save() doesn't work. Additionally, the
error message displays just the first letter, "P". And I have to put
the call to $form->error() because nothing shows up, otherwise.

Criminy!

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