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:
Brad
2025-09-04 18:22:06 -04:00
committed by GitHub
co-authored by philon-
parent bcdda8b751
commit f9bd61af49
6 changed files with 12 additions and 12 deletions
@@ -30,7 +30,6 @@ export function GenericInput<T extends FieldValues>({
control,
disabled,
field,
invalid,
}: GenericFormElementProps<T, InputFieldProps<T>>) {
const { fieldLength, ...restProperties } = field.properties || {};
@@ -46,8 +45,6 @@ export function GenericInput<T extends FieldValues>({
},
});
const isInvalid = invalid || Boolean(error?.message);
const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const newValue = e.target.value;
@@ -100,12 +97,6 @@ export function GenericInput<T extends FieldValues>({
{currentLength}/{fieldLength.max}
</div>
)}
{isInvalid && (
<div className="absolute inset-y-12 bottom-0 flex items-center pr-3">
<p className="text-sm text-red-500">{error?.message ?? ""}</p>
</div>
)}
</div>
);
}