From bd6ad07312994196c54156f3e4ee35387459d35d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Wed, 27 Nov 2024 16:15:28 +0000 Subject: [PATCH] fix: Change `.positive()` to more correct `.nonnegative()` --- .../src/@planx/components/Pay/Public/FeeBreakdown/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor.planx.uk/src/@planx/components/Pay/Public/FeeBreakdown/utils.ts b/editor.planx.uk/src/@planx/components/Pay/Public/FeeBreakdown/utils.ts index cc27682e3d..6afa520dfc 100644 --- a/editor.planx.uk/src/@planx/components/Pay/Public/FeeBreakdown/utils.ts +++ b/editor.planx.uk/src/@planx/components/Pay/Public/FeeBreakdown/utils.ts @@ -26,8 +26,8 @@ export const toFeeBreakdown = (data: PassportFeeFields): FeeBreakdown => ({ }); export const createPassportSchema = () => { - const questionSchema = z.number().positive(); - const setValueSchema = z.tuple([z.coerce.number().positive()]); + const questionSchema = z.number().nonnegative(); + const setValueSchema = z.tuple([z.coerce.number().nonnegative()]); const feeSchema = z .union([questionSchema, setValueSchema]) .transform(toNumber);