Browse Source

Fix form validation

pull/39/head
Sacha Weatherstone 4 years ago
parent
commit
cf47855f23
No known key found for this signature in database GPG Key ID: 7AB2D7E206124B31
  1. 2
      src/components/PageComponents/Config/LoRa.tsx
  2. 4
      src/validation/config/lora.ts

2
src/components/PageComponents/Config/LoRa.tsx

@ -118,7 +118,7 @@ export const LoRa = (): JSX.Element => {
{...register("txPower", { valueAsNumber: true })}
/>
<TextInputField
label="Hop Count"
label="Hop Limit"
description="This is a description."
hint="Hops"
type="number"

4
src/validation/config/lora.ts

@ -15,7 +15,7 @@ export class LoRaValidation implements Protobuf.Config_LoRaConfig {
bandwidth: number;
@IsInt()
// @Min(7)
@Min(7)
@Max(12)
spreadFactor: number;
@ -31,7 +31,7 @@ export class LoRaValidation implements Protobuf.Config_LoRaConfig {
region: Protobuf.Config_LoRaConfig_RegionCode;
@IsInt()
@Min(0)
@Min(1)
@Max(7)
hopLimit: number;

Loading…
Cancel
Save