After upgrading Laravel 5.7 to 5.8 my Validation Error message doesnt seems to work after redirect
$validator = Model::validate($request);
if ($validator->fails()) {
throw ValidationException::withMessages($validator->messages()->toArray());
}
I try do dd($request->all());
It does send the array field that I required and I was not sure what the real problem cause laravel community doesnt seems to have problem with this after searching throughout article
Refer to this answer from Ningappa, remove or move the
'\\Illuminate\\Session\\Middleware\\StartSession::class'
'\\Illuminate\\View\\Middleware\\ShareErrorsFromSession::class'
from $middlewaregroup and place it under $middleware, sometimes it is already there then just removed it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.