It's hard to know what you're looking for exactly but the following code should make sure it's present and an array:
$rule = array(
'item' => ['required', 'array'],
);
Excuse me, i want to set rule for array name of textbox.
// in view
echo Form::text('item[]');
echo Form::text('item[]');
echo Form::text('item[]');
//in controller
$rule=array(
'item[]' => 'required'
);
but it don't work
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community