Validation Message on upload file |
Hi master,
I have some functions to upload invoice images This is my rules : PHP Code: public function upload () This is my view : PHP Code: <form action="/Management/upload" method="post" enctype="multipart/form-data"> This is my controllers : PHP Code: public function invoice () When I tried to upload files such as PDF or anything else except images, validation worked but there was no error message on my input file.
What version of CodeIgniter are you running?
CodeIgniter 4 Users Guide - Library Reference - Validation What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(12-19-2024, 10:27 PM)InsiteFX Wrote: What version of CodeIgniter are you running? I use the 4.5.5 version. I think my validations are already followed as the documentation.
Try dd($this->validation) after check. See all errors . Maybe you reset validation in redirect.
(12-23-2024, 11:40 AM)ozornick Wrote: Try dd($this->validation) after check. See all errors . Maybe you reset validation in redirect. This is the result. Dump and Die I upload the pictures on my Google Drive.
Hi, I’m also working on file upload validations in CodeIgniter 4. I wanted to ask if the issue might be related to how validation data is passed during a redirect? Could storing errors in session()->setFlashdata() and displaying them in the view help solve this?
|
Welcome Guest, Not a member yet? Register Sign In |