From 7ec31e346309a81887e873f506a0c6ff83c020e2 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Tue, 24 Feb 2026 23:23:41 +0100 Subject: [PATCH] chore(setup): always return all validation errors - by default inertia only returns the first validation error this changes it to always return all validation errors --- app/Http/Middleware/HandleInertiaRequests.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/Http/Middleware/HandleInertiaRequests.php b/app/Http/Middleware/HandleInertiaRequests.php index 628a5a9e3..5748558e3 100644 --- a/app/Http/Middleware/HandleInertiaRequests.php +++ b/app/Http/Middleware/HandleInertiaRequests.php @@ -18,6 +18,16 @@ final class HandleInertiaRequests extends Middleware */ protected $rootView = 'app'; + /** + * When enabled, each field will contain an array of all error strings + * instead of only the first validation error. + * + * @see https://inertiajs.com/validation#multiple-errors-per-field + * + * @var bool + */ + protected $withAllErrors = true; + /** * Determines the current asset version. *