Added withInput to carry over older fields

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-04-12 08:25:03 -07:00
parent 14ec96cf45
commit 04f83d34ff

View file

@ -30,6 +30,7 @@ class Handler extends ExceptionHandler
\League\OAuth2\Server\Exception\OAuthServerException::class,
JsonException::class,
SCIMException::class, //these generally don't need to be reported
InvalidFormatException::class,
];
/**
@ -79,7 +80,7 @@ class Handler extends ExceptionHandler
// Handle standard requests that fail because Carbon cannot parse the date on validation (when a submitted date value is definitely not a date)
if ($e instanceof InvalidFormatException) {
return redirect()->back()->with('error', trans('validation.date', ['attribute' => 'date']));
return redirect()->back()->withInput()->with('error', trans('validation.date', ['attribute' => 'date']));
}
// Handle API requests that fail