Browse Source

Allow default overrideFrequency (#838)

* Allow overrideFrequency == 0
* Fix typo

---------

Co-authored-by: philon- <[email protected]>
pull/841/head
Jeremy Gallant 9 months ago
committed by GitHub
parent
commit
1214b6ecf6
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      packages/web/public/i18n/locales/en/common.json
  2. 2
      packages/web/src/validation/config/lora.ts

2
packages/web/public/i18n/locales/en/common.json

@ -113,7 +113,7 @@
"key": "Key is required."
},
"invalidOverrideFreq": {
"number": "Invalid format, expected between 430-930 MHz."
"number": "Invalid format, expected a value in the range 410-930 MHz or 0 (use default)."
}
},
"yes": "Yes",

2
packages/web/src/validation/config/lora.ts

@ -20,7 +20,7 @@ export const LoRaValidationSchema = z.object({
sx126xRxBoostedGain: z.boolean(),
overrideFrequency: z.coerce
.number()
.refine((val) => val >= 410 && val <= 930, {
.refine((val) => val === 0 || (val >= 410 && val <= 930), {
message: "formValidation.invalidOverrideFreq.number",
}),
ignoreIncoming: z.coerce.number().array(),

Loading…
Cancel
Save