I am facing this problem from yesterday and can not fix it. My callback function is not working. It's always returning TRUE, but i don't know why? Can anyone help me?
Here is the the model:
class Login_model extends CI_Model {
public function check_login($str)
{
$this->form_validation->set_message('check_login', 'Error');
return FALSE;
}
function validate_login()
{
$this->form_validation->set_rules('email', 'Email Address', 'trim|required|valid_email|xss_clean');
$this->form_validation->set_rules('password', 'Password', 'callback_check_login');
if($this->form_validation->run() == FALSE)
{
return FALSE;
}
return TRUE;
}}
The callback function should never return TRUE. But it's returning! I am going to die with this problem! :@