Add mimes: application/pdf
Oct 15, 2015
5
Level 26
From Validation for File input and Mime types failing...
I not sure why
I have a form file input that I want to use to only upload documents (doc, docx, pdf), so I have set up the validation as below, all other validation works perfectly.
'document_file' => 'required|mimes:doc,docx,pdf',
But the problem is that it will let docx and doc files through no problem, but any thing else on the list or not like my pdf or even a xlsx file simply reloads the form BUT also without my assigned error message:
'document_file.mimes' => 'Your document is not the correct format.',
Any ideas that i am missing or need to check for this. Are the setting I need to add, could it be a server side issue etc.
NB: I am using the validation class outside of laravel as well.
thanks in advance
Please or to participate in this conversation.