I have a form with dynamics rows. I would like to use FormRequest to validate data rows. How to achieve it ?
Form
<td>
<input class="form-control form-control-sm" id="item_quantity" type="number" step="any" min="0" name="item_quantity[]" value="{{old('item_quantity[]')}}">
{!!$errors->first('item_quantity', '<span class="error">:message</span>')!!}
</td>
My FormRequest Code :
public function rules()
{
return [
'item_quantity' => 'required'
];
}
Finally i made these modifications and its works:
Form
FormRequest
Thks for your helps !