Level 24
@msharaf try
$this->validate($request, [
'location.1' => 'required',
]);
if u want every location to be filled
$this->validate($request, [
'location.*' => 'required',
]);
1 like
Say i have two selects with the same array name
<select name="location[]">
<option value="" selected="selected">please select</option>
<option value="us">US</option>
<option value="uk">UK</option>
</select>
<select name="location[]">
<option value="" selected="selected">please select</option>
<option value="california">california</option>
<option value="alaska">alaska</option>
</select>
i need to make sure last location is selected does laravel validation array has some thing like that
Please or to participate in this conversation.