Hi,
You can make a foreach for validate your array.
For Laravel 5:
public function store(Request $request)
{
foreach ($request->input('universities') as $university) {
$v = \Validator::make(['university' => $university], ['university' => 'your validation rules comes here']);
if ($v->fails()) {
// handling validation fails
} else {
// ...
}
}
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community