There doesn't seem to be much online about the use of this rule and I
am having problems using it to make sure one checkbox is selected
(searches for 'validate multiple' bring up loads about multiple rules
per field).
I first applied it as in the CookBook ...
var $validate = array(
'multiple' => array(
'rule' => array('multiple', array('min' => 1)),
'message' => 'Please select at least one option'
)
);
But thought this probably wasn't working as it was not assigned to any
field, but which field to I apply it to. Looking at teknoid's custom
HABTM validation blog entry (http://teknoid.wordpress.com/2008/10/16/
how-to-validate-habtm-data/) I figured I needed to apply it to the
name of the array in $this->data so ended up with this.
var $validate = array(
'Role' => array(
'rule' => array('multiple', array('min' => 1)),
'message' => 'Please select at least one role'
)
);
Still no joy though .. anyone else got this rule working yet?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---