[eluser]andygo[/eluser]
Thanks InsiteFX, much appreciated
I created a MY_Controller in application/core and extended it in the controller.
I referenced my library file and now my library has access to the callback function in the MY_Controller..
In case this helps anyone here is my code...
Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class MY_Controller extends CI_Controller
{
public function __construct()
{
parent::__construct();
$this->load->library('form_data_lib');
}
public function username_check($str)
{
if ($str == 'test')
{
$this->form_validation->set_message('username_check', 'The %s field can not be the word "test"');
return FALSE;
}
else
{
return TRUE;
}
}
}
// END Class
/* End of file .php */
/* Location: .php */