It looks like you're new here. If you want to get involved, click one of these buttons!
$this->validator->add_rule('captcha', 'callback_check_captcha', 'captcha');
function _valid_captcha()
{
$valid = TRUE;
// check captcha
if (!$this->input->post('captcha') OR strtoupper($this->input->post('captcha')) != strtoupper($this->session->userdata('comment_captcha')))
$valid = FALSE;
return $valid;
}
Comments
$this->validator->add_rule('captcha', array($this, '_valid_captcha'), 'captcha');
Sorry, in the rush, forgot to search the forum first.