samedi 18 novembre 2017

how to Validate json file using laravel 5.4?

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'
            ]);

how could i resolve this issue ? thanks.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2AZWGwL
via IFTTT

Aucun commentaire:

Enregistrer un commentaire