I have tried below mime types for validating PDF files.but none of them doesnt pass the validation .
$rules = [
....
"file" => "required|mimes:application/pdf, application/x-pdf,application/acrobat, applications/vnd.pdf, text/pdf, text/x-pdf|max:10000"
....
]
'files' => true
when opening a form? – Dees Oomens Feb 29 '16 at 8:35application/pdf
ismimetypes
, notmimes
. Note that @Froxz response works when you are validatingpdf
againsmimes
laravel.com/docs/5.7/validation#available-validation-rules – Jon Nov 23 '18 at 22:56Laravel 5.1
was available and this rule was added in 5.2, I have updated my answer. – Froxz Oct 10 '19 at 9:28