From 308a6e905f8eced39cac6d9f5b6ab0f2feb8f04c Mon Sep 17 00:00:00 2001 From: Chloe Date: Fri, 24 Feb 2023 10:11:36 +0700 Subject: [PATCH] allow cart value to be 0 Signed-off-by: Chloe --- src/pages/Promotions/Details/validation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Promotions/Details/validation.ts b/src/pages/Promotions/Details/validation.ts index 77af1341..178b738e 100644 --- a/src/pages/Promotions/Details/validation.ts +++ b/src/pages/Promotions/Details/validation.ts @@ -60,7 +60,7 @@ export const promotionSchema = Yup.object().shape({ triggerParameters: Yup.object({ conditions: Yup.object({ all: Yup.array().of(Yup.object({ - value: Yup.number().moreThan(0, "This field must be greater than 0").required("This field is required") + value: Yup.number().min(0, "This field must be greater than or equal to 0").required("This field is required") })) }), inclusionRules: Yup.object({