I\'m having some problems converting a piece of form validation code to CI 2.0. I\'m trying to validate an array of checkboxes but for some reason validation fails to run th
An array must be passed to your set_rules call suffixed with opening / closing square brackets, like so:
$this->form_validation->set_rules('checkboxes[]', 'My Checkboxes', 'required');
There are more details in the CI user guide - https://www.codeigniter.com/user_guide/libraries/form_validation.html#using-arrays-as-field-names
To handle the check for your checkbox values to be one of several values, you would need to create a custom callback function - https://www.codeigniter.com/user_guide/libraries/form_validation.html#callbacks-your-own-validation-methods