CSV file Validation

Validating a csv file not working... Forms\Components\FileUpload::make('upload') ->rules([File::types(['csv'])]) ->acceptedFileTypes(['text/csv','csv', 'text/plain']) Livewire config is: 'rules' => ['file', 'mimes:text/csv,text/plain,csv,png,jpg,jpeg', 'max:12288'], Forms\Components\FileUpload::make('upload') ->rules([File::types(['csv'])]) none of these works
4 Replies
LeandroFerreira
Forms\Components\FileUpload::make('upload')
->rules(['mimes:csv,txt'])
Forms\Components\FileUpload::make('upload')
->rules(['mimes:csv,txt'])
?
ImShehryar
ImShehryarOP2y ago
What about using ->acceptedFileTypes([]) to force the browser to show only csv files when browsed ?
LeandroFerreira
Did ->rules() work?
ImShehryar
ImShehryarOP2y ago
Yes works..BTW i also use acceptedFileTypes...seems not working..anyhow..Let the livewire handle it...thank u
Want results from more Discord servers?
Add your server