On one hand form validation could be seen as part of the application logic and therefore belonging in the model.
On the other hand, it deals directly with the input
If you validate form in serverside using codeigniter then it validate in controller
You need to include the form_validation library using autoload like this
$autoload['libraries'] = array("form_validation")
OR directly you load in Controller
$this->load->library('form_validation');
Then you set the validation rule to each form field
$this->form_validation->set_rules('username', 'User Name', 'required');
$this->form_validation->set_rules('useremail', 'User Email', 'required|valid_email');
If any error found after validation a form field then it catch in validate function
if ($this->form_validation->validate()) {
//return back to form
} else {
//successful validate all field
}