$validator = Validator::make($request->all(), [
'image.*' => 'required|image',
'descr.*' => 'string|nullable|max:10000',
'board.*' => 'integer',
'link.*' => 'url|nullable'
]);
if ($validator->fails()) {
return redirect('/upload')->withErrors($validator);
}
$validator = Validator::make($request->all(), [
'image' => 'required',
'image.*' => 'image',
'descr.*' => 'string|nullable|max:10000',
'board.*' => 'integer',
'link.*' => 'url|nullable'
]);
if ($validator->fails()) {
return redirect('/upload')->withErrors($validator);
}