Rule in controller:
$this->form_validation->set_rules('text', $this->lang->line('text_input_name'), 'required|trim|callback_ValidateTooltipTags['. $this->input->post('text') .']');
Callback in controller:
public function ValidateTooltipTags($string)
{
$this->load->model('library_model');
if($this->library_model->ValidateTooltipTags($string))
{
return TRUE;
}
else
{
$this->form_validation->set_message('ValidateTooltipTags', $this->lang->line('site_message_invalid_tooltip_tags'));
return FALSE; //or TRUE, it doesn't matter i always get validation error
}
}
I always get validation error, even if i change FALSE in callback to TRUE. Do you have any ideas, what is wrong? Thank you very much.