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.
This commit is contained in:
2026-05-20 21:27:30 -07:00
parent 0811771ae6
commit 4f32527732

View File

@@ -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