mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-05 20:56:13 -05:00
Fix: "should validate for duplicates too (if any duplicates -> error)"
This commit is contained in:
parent
a1b7748759
commit
aeb7667638
|
|
@ -519,7 +519,6 @@ export function dayMonthYearRequired(args: DateTimeArgs) {
|
|||
});
|
||||
}
|
||||
|
||||
// xxx: should validate for duplicates too (if any duplicates -> error)
|
||||
export function checkboxGroup<V extends string>(
|
||||
args: WithTypedTranslationKeys<
|
||||
WithTypedItemLabels<
|
||||
|
|
@ -531,6 +530,7 @@ export function checkboxGroup<V extends string>(
|
|||
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),
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user