Hi everyone,
I am having issues validating the file input. This is the rule i have in place to validate the file type.
'import' => 'required|mimes:xls,xlsx',
It works well when the file type is xlsx. But when it is not, instead of returning the error message it
populates this error,
Exception
Serialization of 'Symfony\Component\HttpFoundation\File\UploadedFile' is not allowed
I checked the mimes_type.php and both the files exist.
'xls' => 'application/vnd.ms-excel',
'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
Can anyone guide me through on how i can either:
#A) extend validation to create a method to validate the file input to ensure that it is of the right extension/mime type
#B) solve the error that i mentioned on top.
Thanks in advance for the help!