Hello, I Think this file consider as a text Look Common MIME types
Nov 29, 2021
9
Level 6
File validation not working correctly
I'm not sure if I'm doing something wrong, or if this is a bug. Right now, my validator looks like this (the line breaks look off in the preview):
$validator = Validator::make($request->all(), [
'attachments.*' => 'mimes:png,jpg,jpeg,svg,csv,txt,xlx,xls,xlsx,pdf,doc,docx,zip,rar,wav,mp3,mp4,mov,mkv,webm,avi,ogg,m4a,flac,wma,aac,sketch,psd|max:500000',
]);
It basically works. So when I upload for example a xml file, $validator->fails() returns true.
But when I upload a html file, the file is being uploaded without errors and $validator->fails() returns false. And when uploading a wav file, which is allowed, it fails.

What am I doing wrong?
Please or to participate in this conversation.