CodeIgniter Forums
Extend form_validation for upload Codeigniter 3 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forum-11.html)
+--- Thread: Extend form_validation for upload Codeigniter 3 (/thread-75307.html)



Extend form_validation for upload Codeigniter 3 - Myster - 01-24-2020

Hello,

Is there a library that extends the form_validation which supports verifications of image or file uploads?

Thank you


RE: Extend form_validation for upload Codeigniter 3 - PaulD - 01-24-2020

The file upload library has quite a few file validation options.
https://codeigniter.com/user_guide/libraries/file_uploading.html

Callbacks in form validation are quite powerful too, so you can write any function you want as a callback and set errors for validation.
https://codeigniter.com/user_guide/libraries/form_validation.html#callable-use-anything-as-a-rule

I hope something in there helps.

Paul