[eluser]CroNiX[/eluser]
You can only pass strings via the 2nd parameter, so you need to do something like:
Code:
$this->form_validation->set_rules('admin_title', 'Somefield', 'required|valid_array_element[' . implode(';', $array) . ']');
And then in your validation function, first line:
Code:
function valid_array_element($str, $allowed)
{
$allowed = explode(';', $allowed);
//..rest of your code
}