mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-06 13:34:13 +03:00
enforce at least one letter in zone names (#20561)
Some checks failed
CI / AMD64 Build (push) Has been cancelled
CI / ARM Build (push) Has been cancelled
CI / Jetson Jetpack 6 (push) Has been cancelled
CI / AMD64 Extra Build (push) Has been cancelled
CI / ARM Extra Build (push) Has been cancelled
CI / Synaptics Build (push) Has been cancelled
CI / Assemble and push default build (push) Has been cancelled
Some checks failed
CI / AMD64 Build (push) Has been cancelled
CI / ARM Build (push) Has been cancelled
CI / Jetson Jetpack 6 (push) Has been cancelled
CI / AMD64 Extra Build (push) Has been cancelled
CI / ARM Extra Build (push) Has been cancelled
CI / Synaptics Build (push) Has been cancelled
CI / Assemble and push default build (push) Has been cancelled
This commit is contained in:
parent
4c689dde8e
commit
4319118e94
@ -385,7 +385,8 @@
|
||||
"mustNotBeSameWithCamera": "Zone name must not be the same as camera name.",
|
||||
"alreadyExists": "A zone with this name already exists for this camera.",
|
||||
"mustNotContainPeriod": "Zone name must not contain periods.",
|
||||
"hasIllegalCharacter": "Zone name contains illegal characters."
|
||||
"hasIllegalCharacter": "Zone name contains illegal characters.",
|
||||
"mustHaveAtLeastOneLetter": "Zone name must have at least one letter."
|
||||
}
|
||||
},
|
||||
"distance": {
|
||||
@ -443,7 +444,7 @@
|
||||
"name": {
|
||||
"title": "Name",
|
||||
"inputPlaceHolder": "Enter a name…",
|
||||
"tips": "Name must be at least 2 characters and must not be the name of a camera or another zone."
|
||||
"tips": "Name must be at least 2 characters, must have at least one letter, and must not be the name of a camera or another zone."
|
||||
},
|
||||
"inertia": {
|
||||
"title": "Inertia",
|
||||
|
||||
@ -149,6 +149,11 @@ export default function ZoneEditPane({
|
||||
)
|
||||
.refine((value: string) => /^[a-zA-Z0-9_-]+$/.test(value), {
|
||||
message: t("masksAndZones.form.zoneName.error.hasIllegalCharacter"),
|
||||
})
|
||||
.refine((value: string) => /[a-zA-Z]/.test(value), {
|
||||
message: t(
|
||||
"masksAndZones.form.zoneName.error.mustHaveAtLeastOneLetter",
|
||||
),
|
||||
}),
|
||||
inertia: z.coerce
|
||||
.number()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user