validation in the file model |
I need to validate files using codeigniter 4 and when placing validation rules, I also need to allow empty, but when using the "permit empty" rule it ignores all other rules.
'course' => 'permit_empty|max_size[course,2000]|ext_in[pdf,tar,zip]'
See the note at the end.
https://codeigniter4.github.io/userguide...le-uploads
In conclusion, only Rules for File Uploads should be used for uploaded files. Otherwise, you will not get the expected results.
If the existing rules do not work for you, create a custom rule. Quote:uploaded |
Welcome Guest, Not a member yet? Register Sign In |