Skip to content

Commit

Permalink
chore: remove log message (#4996)
Browse files Browse the repository at this point in the history
remove validate
  • Loading branch information
timarney authored Jan 17, 2025
1 parent 924738e commit fa7316d
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions app/(gcforms)/[locale]/(form filler)/id/[...props]/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { processFormData } from "./lib/processFormData";
import { MissingFormDataError } from "./lib/exceptions";
import { logMessage } from "@lib/logger";
import { getPublicTemplateByID } from "@lib/templates";
import { validateResponses } from "@lib/validation/validation";
// import { validateResponses } from "@lib/validation/validation";

// Public facing functions - they can be used by anyone who finds the associated server action identifer

Expand All @@ -25,18 +25,21 @@ export async function submitForm(
throw new Error(`Could not find any form associated to identifier ${formId}`);
}

const validateResponsesResult = await validateResponses(values, template);
// const validateResponsesResult = await validateResponses(values, template);

if (Object.keys(validateResponsesResult).length !== 0) {
// if (Object.keys(validateResponsesResult).length !== 0) {

/*
logMessage.warn(
`[server-action][submitForm] Detected invalid response(s) in submission on form ${formId}. Errors: ${JSON.stringify(
validateResponsesResult
)}`
);
*/

// Turn this on after we've monitored the logs for a while
// throw new MissingFormDataError("Form data validation failed");
}
// Turn this on after we've monitored the logs for a while
// throw new MissingFormDataError("Form data validation failed");
//}

const formDataObject = buildFormDataObject(template, values);

Expand Down

0 comments on commit fa7316d

Please sign in to comment.