Welcome Guest, Not a member yet? Register   Sign In
No way to permit empty on file upload
#1

$Rules['image'] = ['label' => 'Image', 'rules'=>'uploaded[image]|is_image[image]|max_size[image.2048]'];


I am always getting an error for the image that is not an uploaded image file.

But i am not uploading any.

How can i make this rule permit empty. And only if something was set should validate the rules...

I tried with permit_empty, it does not work.
It doesn't show any validation errors if i upload a wrong image or exceed max file size or even if i upload another type of file that is not an image...
Reply


Messages In This Thread
No way to permit empty on file upload - by crustamet - 05-22-2020, 08:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB