LiukSkyDrive
4 years ago

Validation Mimes and Requested Rule

Posted 4 years ago by LiukSkyDrive

Hello people, here my first conversation with a simple question about mimes validation and required rule. I have a form with a NOT required file input. I want to validate this input with PDF mime rule, so I created the rule:

'order.file' => 'mimes:pdf|max:2000',

The problem is: if I submit the form without file, the validation fail because requires a PDF file type. So, my question is: how can I validate the PDF mime without required state?

Thanks in advance.

Please sign in or create an account to participate in this conversation.