[eluser]dimis[/eluser]
I have a validation rule that it does not work.
I wrote a callback function that is never running, what is wrong?
The code is
Code:
$this->load->library('form_validation');
$this->form_validation->set_rules('cart_name', 'name', 'required', 'callback_check_text');
....
function check_text($str)
{
$a=$_POST['FCKEDITOR1'];
$b=$_POST['FCKEDITOR2'];
die(empty($a));
if (empty($a) || empty($b))
{
$this->form_validation->set_message('cart_name', 'Description and text must not be empty');
return FALSE;
}
else
{
return TRUE;
}
}
}