Fixed overrideFrequency Input Constraints (#801)
* Fixed overrideFrequency to properly allow for floats with a minimum of 410 MHz and maximum of 930 MHz. Added 3 decimal point check. * Removed duplicate error message in FormInput.tsx * Added error message for overrideFrequency in several locales * Simplified check and reverted translated languages to English besides German. Also fixed a typo in src/components/UI/Input.tsx. * Let i18n handle fallback + linting --------- Co-authored-by: philon- <jeremy@gallant.se>
This commit is contained in:
@@ -18,7 +18,11 @@ export const LoRaValidationSchema = z.object({
|
||||
channelNum: z.coerce.number().int(),
|
||||
overrideDutyCycle: z.boolean(),
|
||||
sx126xRxBoostedGain: z.boolean(),
|
||||
overrideFrequency: z.coerce.number().int(),
|
||||
overrideFrequency: z.coerce
|
||||
.number()
|
||||
.refine((val) => val >= 410 && val <= 930, {
|
||||
message: "formValidation.invalidOverrideFreq.number",
|
||||
}),
|
||||
ignoreIncoming: z.coerce.number().array(),
|
||||
ignoreMqtt: z.boolean(),
|
||||
configOkToMqtt: z.boolean(),
|
||||
|
||||
Reference in New Issue
Block a user