samedi 6 octobre 2018

validation of array is not working perfectly in laravel5.6

Iam using laravel 5.6. Array validation returns error for all index instead of a particular index. Array is dynamic so index cannot be harcoded. in the view, the error is showing for all index. But I filled inputs for all other indexes except one.This is my controller code .

 $this->validate($request, [
            'page.*.title' => 'required',
            'page.*.description' => 'required',
            'page.*.meta_title' => 'required',
            'page.*.meta_description' => 'required',
            'page.*.meta_keyword' => 'required',
        ])



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire