From 4f32527732790aabc69ef4b3d9992ab3e00b3e5f Mon Sep 17 00:00:00 2001 From: Bryce Date: Wed, 20 May 2026 21:27:30 -0700 Subject: [PATCH] Fix form error display for root-level validation errors When validation errors occur at the root level (e.g., from :fn validators in multi schemas), they are returned as a vector directly rather than a map with :errors key. Update default-step-footer to handle both cases. --- src/clj/auto_ap/ssr/components/multi_modal.clj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/clj/auto_ap/ssr/components/multi_modal.clj b/src/clj/auto_ap/ssr/components/multi_modal.clj index 1e45a887..b6295ad4 100644 --- a/src/clj/auto_ap/ssr/components/multi_modal.clj +++ b/src/clj/auto_ap/ssr/components/multi_modal.clj @@ -148,7 +148,9 @@ next-button-content]}] [:div.flex.justify-end [:div.flex.items-baseline.gap-x-4 - (com/form-errors {:errors (:errors (:step-params fc/*form-errors*))}) + (let [step-errors (:step-params fc/*form-errors*)] + (com/form-errors {:errors (or (:errors step-errors) + (when (sequential? step-errors) step-errors))})) (when (not= (first (steps linear-wizard)) (step-key step)) (when validation-route