In order to make the callbacks work inside a module, MY_Form_validation should have a public property $CI and then add a reference to the controller after loading the form_validation library, just as wiredesignz explained in the documentation:
<?php
/** application/libraries/MY_Form_validation **/
class MY_Form_validation extends CI_Form_validation
{
public $CI; // make the CI_Form_validation::CI property public
}
<?php
class Xyz extends MX_Controller
{
function __construct()
{
parent::__construct();
$this->load->library('form_validation');
$this->form_validation->CI =& $this;
}
}
In order to make the callbacks work inside a module, MY_Form_validation should have a public property $CI and then add a reference to the controller after loading the form_validation library, just as wiredesignz explained in the documentation:
https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc