Welcome Guest, Not a member yet? Register   Sign In
Upload PDF file (not required)
#1

I have problem with form validation for upload file, here my validation rule

'file' => [
              // 'uploaded[file]',
                'mime_in[file,application/pdf,image/jpg,image/jpeg,image/gif,image/png]',
                'max_size[file,4096]',
    ],


However, if I don't upload the image, it shows validation error. How to set this validation rule only to apply to an uploaded file?
Reply


Messages In This Thread
Upload PDF file (not required) - by xibnoe - 11-22-2020, 07:06 PM
RE: Upload PDF file (not required) - by InsiteFX - 11-25-2020, 03:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB