mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-09-26 19:41:29 +08:00
Trim group name before length validation (#17539)
This commit is contained in:
@@ -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 (
|
||||
|
Reference in New Issue
Block a user