diff --git a/web/src/components/filter/CameraGroupSelector.tsx b/web/src/components/filter/CameraGroupSelector.tsx index 9d0a39aff..ecb06a12b 100644 --- a/web/src/components/filter/CameraGroupSelector.tsx +++ b/web/src/components/filter/CameraGroupSelector.tsx @@ -657,10 +657,11 @@ export function CameraGroupEdit({ const formSchema = z.object({ name: z .string() + .trim() .min(2, { message: t("group.name.errorMessage.mustLeastCharacters"), }) - .transform((val: string) => val.trim().replace(/\s+/g, "_")) + .transform((val: string) => val.replace(/\s+/g, "_")) .refine( (value: string) => { return (