07-11-2012, 01:44 AM
[eluser]LuckyFella73[/eluser]
Though that would work as well one advantage of using callback functions
when validating a form is that you can easily set appropiate error messages
using the build-in functionality (form_validation class).
Quote:if ($this->form_validation->run() == FALSE or ! $this->upload->do_upload(‘image’) )
{}else{}
Though that would work as well one advantage of using callback functions
when validating a form is that you can easily set appropiate error messages
using the build-in functionality (form_validation class).
Code:
$this->form_validation->set_message('_name_callback_function', $this->upload->display_errors());
// or custom message:
$this->form_validation->set_message('_name_callback_function', 'Something went wrong with you selected file');