Form validation class I put the code,
public function custom($str)
{
if ( ! is_array($str))
{
return (trim($str) == '')? FALSE : TRUE;
}
else
{
return ( ! empty($str));
}
}
In the form validation land I put:
$lang['custom'] = "É necessário aceitar os %s";
And the controller class the code
$this->form_validation->set_rules('termos','TERMOS E CONDIÇÕES','custom');
And it doesn't work, how can I fix this?