From aeb7667638dd71fec85e0a760bfba45602515201 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sat, 14 Mar 2026 14:02:33 +0200 Subject: [PATCH] Fix: "should validate for duplicates too (if any duplicates -> error)" --- app/form/fields.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/form/fields.ts b/app/form/fields.ts index aabfa0015..6fb8cf96d 100644 --- a/app/form/fields.ts +++ b/app/form/fields.ts @@ -519,7 +519,6 @@ export function dayMonthYearRequired(args: DateTimeArgs) { }); } -// xxx: should validate for duplicates too (if any duplicates -> error) export function checkboxGroup( args: WithTypedTranslationKeys< WithTypedItemLabels< @@ -531,6 +530,7 @@ export function checkboxGroup( return z .array(itemsSchema(args.items)) .min(args.minLength ?? 0) + .refine((val) => val.length === R.unique(val).length) .register(formRegistry, { ...args, label: prefixKey(args.label),