php - Laravel - document extension validation rule -


i have document upload field , validate in laravel using rule:

'document' => 'required|mimes:doc,docx,rtf,txt,xls,xlsx,ppt,pdf|max:1536'

it works fine on validations. realized allowed csv too, came know mime type csv text that's allows it. tried upload .sql worked too.

what best way have validation based on extension of document?


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

Laravel mail error `Swift_TransportException in StreamBuffer.php line 269: Connection could not be established with host smtp.gmail.com [ #0]` -

c# SetCompatibleTextRenderingDefault must be called before the first -