I have set the various validation rules for different pages in a config file. And in one page I want to check if a username exists or not. Is it possible to create a validation rule in the config file itself? but I created the function for checking in a model. I want to know if it is not possible to call the callback function in that model in config file?
I have read the article in http://codeigniter.com/wiki/MY_Validation_-_Callbacks_into_Models/. In that article it specified that we will have to be call the validation rule like:
$this->form_validation->run($this);
and by setting the validation rules in a config file, we will have to call the function like:
$this->form_validation->run('name of rule in config file');
How do I join both these?