CodeIgniter has many validation rules but is there any rule for checking if the value from a certain field is present in an array(given as parameter to the validation rule)?
For example:
$possible_values = array('beer', 'soda', 'wine', 'water');
$this->form_validation->set_rules('drink', 'Drink', 'required|trim|found_in_array[possible_values]');