How can I use {ci_form_validation field=’title’ error=’true’} in the controller ?
I have this code
$this->load->library('form_validation');
$this->form_validation->set_rules('title', $this->lang->line('title'), 'trim|required|min_length[3]|xss_clean');
$this->form_validation->set_rules('fahad', $this->lang->line('blog'), 'trim|required|min_length[20]|xss_clean');
$this->form_validation->set_rules('writer', $this->lang->line('writer'), 'trim|required|alpha_dash|min_length[3]|xss_clean');
I want to print error message in controller because I am using jquery.
Use this from user guide
EDITED
ok try
this will give you every error after that you can get what you want