public function index()
{
$this->load->library('form_validation');
$this->form_validation->set_rules('skills[]', 'skill', 'callback_skills_check');
if ($this->form_validation->run() == FALSE)
{
$this->load->view('my_form');
}
else
{
$this->load->view('formsuccess');
}
}
public function skills_check($arraySkills)
{
if (in_array('Strength', $arraySkills)) {
$this->form_validation->set_message('skills_check', 'The field {field} must contain the word "Strength"');
return FALSE;
} else {
return TRUE;
}
}