vendredi 21 décembre 2018

Skip first index of array validation rule?

Good Evening Devs, I'm trying to skip the first index of the array while applying validation rule and this is what I tried so far

$validatedData = Validator::make($request->all(),([
            'inventories.0'      => 'bail',
            'inventories'        => 'required|array|filled',
            'quantities.0'       => 'bail',
            'quantities.*'       => 'required|array|filled',
            'required.0'         => 'bail',
            'required.*'         => 'required|array|filled',
        ]));

But it's not working, any ideas? I'm trying to add multiple dynamic fields, but want to skip the first index of it. Please review the picture given below to get the clear picture of the problem.

enter image description here



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire