I need to validate json file only when user upload from browser but doesn't works ,it works when i combined with txt file. working code source
$this->validate($request, [
// check validtion for json
'dataset_type' => 'required|mimes:json,txt'
]);
what i need is to validate json file only below code doesn't works
$this->validate($request, [
// check validtion for json
'dataset_type' => 'required|mimes:json'
]);
even following codes don't works $this->validate($request, [
'dataset_type' => 'required|file|mimes:application/json'
]);
Please anyone could she/he help me for this issue ? thanks.