From 74a516808e39d9085fdf2cd51a1ae70ed15c9ac8 Mon Sep 17 00:00:00 2001 From: Dovile Date: Fri, 20 Oct 2023 14:59:22 +0300 Subject: [PATCH] validation fix --- src/utils/validations.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/validations.ts b/src/utils/validations.ts index 712eb8e..3bf9cdd 100644 --- a/src/utils/validations.ts +++ b/src/utils/validations.ts @@ -54,7 +54,7 @@ export const validateMyProfile = Yup.object().shape({ export const validateFishStocking = Yup.object().shape({ location: Yup.object().required(validationTexts.requireText), - eventTime: Yup.date().required(validationTexts.requireText), + eventTime: Yup.date().required(validationTexts.requireText).typeError(validationTexts.requireText), assignedTo: Yup.object().required(validationTexts.requireText).nullable(), phone: Yup.string() .required(validationTexts.requireText) @@ -85,7 +85,7 @@ export const validateFishStocking = Yup.object().shape({ export const validateFreelancerFishStocking = Yup.object().shape({ location: Yup.object().required(validationTexts.requireText), - eventTime: Yup.date().required(validationTexts.requireText), + eventTime: Yup.date().required(validationTexts.requireText).typeError(validationTexts.requireText), batches: Yup.array().of( Yup.object().shape({ fishType: Yup.object().required(validationTexts.requireSelect).nullable(),