07-11-2012, 11:05 AM
[eluser]JuanitoDelCielo[/eluser]
[quote author="LuckyFella73" date="1341996244"]
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]
True & Sweet, I love your solution! I'll use it from now!
[quote author="LuckyFella73" date="1341996244"]
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');
True & Sweet, I love your solution! I'll use it from now!