I am separating the logic of defining form validation rules into a library. i want to apply multiple callback functions on a single form element.
$this->form_validation->set_rules('email', 'email', 'callback_db_check|callback_valid_email');
Now i don't know how to do this. Because its not working i mean multiple callback are not working. But if i define single callback its working fine.
function db_check(){
$this->CI->form_validation->set_message('db_check', 'Not found in db');
}
function valid_email(){
$this->CI->form_validation->set_message('db_check', 'Invalid email');
}
This is just example code. I have extended form validation library so that i can define and call validation logic from my library . Any suggestion how i can do it?