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

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.
Thanks.
Reply
#2

What did you change?
Reply
#3

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

required can't be used for uploaded file.
Reply
#4

@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 )
Reply
#5

@InsiteFX Thanks!

I added it to the PR:
https://github.com/codeigniter4/CodeIgniter4/pull/5411
Reply




Theme © iAndrew 2016 - Forum software by © MyBB