I have checked all the questions of similar kind, and none of them are solving my problem, using CI 2.1.3, and HMVC from Wiredesignz.
I have in my form_validation.php config file the following rule:
array(
'field' => 'eta-renpal-1',
'label' => 'Renpal number (1)',
'rules' => 'required|callback_check_eta_group'
),
And in my ETA controller, I have this function (currently set to ALWAYS be invalid while testing):
public function check_eta_group($reference)
{
// Internal function for use by form validation system to check if the ETA group requirements are met.
$this->form_validation->set_message('check_eta_group', 'Other values in the group ' . $reference . ' are also required.');
return false;
}
For some reason, the "required" function works, but the callback does not. I have tried all other similar suggested solutions, and can't get them to work. Please help?
Edit: The callback does not appear to be called at all. I even did var_dump() in the callback to see if there is output on the screen - none...
Edit2:: See last comment by myself - using that work-around solves the problem, but it is not exactly what I wanted. So - if you have a better solution, please share :-)