Skip to content

[Experimental] Server-side validation testing (exception) #5854

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 8 commits into
base: fix/page_visibility_for_validation
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export async function submitForm(
);
// Keeping in "passive mode" for now.
// Uncomment following line to throw validation error from server.
// throw new MissingFormDataError("Form data validation failed");
throw new MissingFormDataError("Form data validation failed");
}

const formDataObject = buildFormDataObject(template, values);
Expand Down
2 changes: 2 additions & 0 deletions components/clientComponents/forms/NextButton/NextButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { ForwardArrowIcon24x24 } from "@serverComponents/icons";
import { isFormClosed } from "app/(gcforms)/[locale]/(form filler)/id/[...props]/actions";
import { useRouter } from "next/navigation";
import { formHasGroups } from "@root/lib/utils/form-builder/formHasGroups";
import { CurrentGroupSelector } from "../CurrentGroupSelector/CurrentGroupSelector";

export const NextButton = ({
validateForm,
Expand Down Expand Up @@ -126,6 +127,7 @@ export const NextButton = ({
</>
)}
</Button>
<CurrentGroupSelector />
</>
);
};
Loading