mirror of
				https://github.com/blakeblackshear/frigate.git
				synced 2025-10-27 10:52:11 +01:00 
			
		
		
		
	Don't allow periods in zone or camera group names (#13400)
This commit is contained in:
		
							parent
							
								
									ca0f6e4c0a
								
							
						
					
					
						commit
						f4f3cfa911
					
				@ -551,6 +551,14 @@ export function CameraGroupEdit({
 | 
			
		||||
          message: "Camera group name already exists.",
 | 
			
		||||
        },
 | 
			
		||||
      )
 | 
			
		||||
      .refine(
 | 
			
		||||
        (value: string) => {
 | 
			
		||||
          return !value.includes(".");
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          message: "Camera group name must not contain a period.",
 | 
			
		||||
        },
 | 
			
		||||
      )
 | 
			
		||||
      .refine((value: string) => value.toLowerCase() !== "default", {
 | 
			
		||||
        message: "Invalid camera group name.",
 | 
			
		||||
      }),
 | 
			
		||||
 | 
			
		||||
@ -106,6 +106,14 @@ export default function ZoneEditPane({
 | 
			
		||||
        {
 | 
			
		||||
          message: "Zone name already exists on this camera.",
 | 
			
		||||
        },
 | 
			
		||||
      )
 | 
			
		||||
      .refine(
 | 
			
		||||
        (value: string) => {
 | 
			
		||||
          return !value.includes(".");
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          message: "Zone name must not contain a period.",
 | 
			
		||||
        },
 | 
			
		||||
      ),
 | 
			
		||||
    inertia: z.coerce
 | 
			
		||||
      .number()
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user