Welcome Guest, Not a member yet? Register   Sign In
CI4 "required" rule fails despite form field has a value!

Hello CI gods.
I have run into a situation with form validation in CI4.
My file upload form worked perfectly about a little while ago. The "required" validation rule fails for an image file input despite choosing an image file that conforms with my upload rules, and therefore upload fails. On submitting the upload form, the file input field errors out with "field is required" notification.
If I remove the "required" rule from my config file for the particular class/method processing upload data, the form is successfully submitted.
I have checked over and over and it's not working and I seem to not be able to figure out what the problem might be.
Any help would be greatly appreciated.

What did you change?

(This post was last modified: 11-29-2021, 09:47 PM by kenjis.)

required can't be used for uploaded file.

@kenjis Maybe add that information to the CodeIgniter Users Guide for uploaded files.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

@InsiteFX Thanks!

I added it to the PR:

Theme © iAndrew 2016 - Forum software by © MyBB