Welcome Guest, Not a member yet? Register   Sign In
Do you know withInput() and Validation errors?

(This post was last modified: 08-17-2022, 05:16 AM by kenjis.)

redirect()->withInput() and Validation errors have an undocumented behavior.

If you redirect with withInput():
PHP Code:
if (! $this->validate($rules)) {
    return redirect()->back()->withInput();


You can use the Validation object with the validation errors in the previous page.
PHP Code:
<?= service('Validation')->listErrors() ?>

But this feature has bugs or design flaw.
So I would like to remove the feature, and add a new helper function to get the validation errors.

Any opinion?

Messages In This Thread
Do you know withInput() and Validation errors? - by kenjis - 08-16-2022, 10:18 PM

Theme © iAndrew 2016 - Forum software by © MyBB