load->helper('form'); $this->load->library('validation'); } function index() { // Setup some rules. .... $rules['verify'] = "trim|xss_clean|callback_verify_checkbox"; $this->validation->set_rules($rules); ..... } function verify_checkbox($str) { if(!isset($str)) { $this->validation->set_message('verify_checkbox', 'zomg error!'); return false; } else { return true; } } } ?>