From 5b4f677d2ea86ce610ccda36daf0b6f7a8ff233e Mon Sep 17 00:00:00 2001 From: alexd-bes <129009580+alexd-bes@users.noreply.github.com> Date: Mon, 26 Feb 2024 07:35:33 +1300 Subject: [PATCH] No issue: Remove unnecessary autocomplete validation - Fix issue where old autocomplete validation causes error --- .../src/features/Survey/useValidationResolver.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packages/datatrak-web/src/features/Survey/useValidationResolver.ts b/packages/datatrak-web/src/features/Survey/useValidationResolver.ts index 5a2cde2862..24c2dc3877 100644 --- a/packages/datatrak-web/src/features/Survey/useValidationResolver.ts +++ b/packages/datatrak-web/src/features/Survey/useValidationResolver.ts @@ -16,14 +16,6 @@ const getBaseSchema = (type: QuestionType) => { switch (type) { case QuestionType.Number: return yup.number().transform(transformNumberValue).nullable(); - case QuestionType.Autocomplete: - return yup - .object() - .shape({ - value: yup.string(), - }) - .nullable() - .default(null); // Allow this value to be empty to stop a typeError. The mandatory validation will handle this instead case QuestionType.Date: case QuestionType.SubmissionDate: case QuestionType.DateOfData: