vendredi 24 mai 2019

Validate files in Laravel 5.8

I have validation:

if ($request->hasFile('otherFiles')) {
            $this->validate($request, [
                'otherFiles' => 'mimes:image/jpeg'
            ]);
        }

How can I add to this validation files type: DOC, DOCX, CSV, PDF, RTF, PNG, xlsx, XLS, TXT, BMP?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire