From 04866c8d26d476cba58cac61748f216153f5d03f Mon Sep 17 00:00:00 2001 From: Lars Olav Torvik Date: Tue, 3 Dec 2024 12:51:03 +0100 Subject: [PATCH] Force validation to be active when validating from summary page --- .../src/util/form/panel-validation/panelValidation.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/shared-components/src/util/form/panel-validation/panelValidation.ts b/packages/shared-components/src/util/form/panel-validation/panelValidation.ts index 62a4d0e25..e4e2cb06d 100644 --- a/packages/shared-components/src/util/form/panel-validation/panelValidation.ts +++ b/packages/shared-components/src/util/form/panel-validation/panelValidation.ts @@ -9,6 +9,8 @@ export type PanelValidation = { }; const findFirstInputWithValidationError = (wizardComponent, data): Component | undefined => { + // Need to tell the Formio root component that the form has been submitted, to trigger validation. + wizardComponent.root.submitted = true; const valid = wizardComponent.checkValidity(data); if (!valid && wizardComponent.component.input) { return wizardComponent.component;