Fix user validation

This commit is contained in:
Sacha Weatherstone
2022-12-31 00:57:50 +11:00
parent acf2f9c3f4
commit f7fe27d621
+3 -2
View File
@@ -1,11 +1,12 @@
import { IsBoolean, Length } from "class-validator";
import { IsBoolean, IsOptional, IsString, Length } from "class-validator";
import type { Protobuf } from "@meshtastic/meshtasticjs";
export class UserValidation
implements Omit<Protobuf.User, "macaddr" | "hwModel">
{
@Length(2, 30)
@IsString()
@IsOptional()
id: string;
@Length(2, 30)