From a0175ff5abf99e8ff26b70a218b31842479c0894 Mon Sep 17 00:00:00 2001 From: monsieurswag Date: Fri, 13 Sep 2024 13:22:30 +0200 Subject: [PATCH] Accept floats up to 6-digit of precision in the NumberField for cost --- frontend/src/lib/utils/schemas.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/lib/utils/schemas.ts b/frontend/src/lib/utils/schemas.ts index 32252f01a..344d1eff7 100644 --- a/frontend/src/lib/utils/schemas.ts +++ b/frontend/src/lib/utils/schemas.ts @@ -120,7 +120,7 @@ export const AppliedControlSchema = baseNamedObject({ expiry_date: z.string().optional().nullable(), link: z.string().url().optional().or(z.literal('')), effort: z.string().optional().nullable(), - cost: z.number().optional().nullable(), + cost: z.number().multipleOf(0.000001).optional().nullable(), folder: z.string(), reference_control: z.string().optional().nullable(), owner: z.string().uuid().optional().array().optional()