mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-08-22 13:47:29 +02:00
Trim group name before length validation (#17539)
This commit is contained in:
parent
7917ec611a
commit
1ef79ce5f1
@ -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 (
|
||||
|
Loading…
Reference in New Issue
Block a user