From 6a1e0594dc55e35c0846370ff6bc7a8bd55947de Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Mon, 8 Mar 2021 18:40:37 +0100 Subject: rename req.userid -> req.user_id --- src/util/instanceOf.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/util/instanceOf.ts') diff --git a/src/util/instanceOf.ts b/src/util/instanceOf.ts index bbb30c12..4f30bd46 100644 --- a/src/util/instanceOf.ts +++ b/src/util/instanceOf.ts @@ -51,7 +51,7 @@ export class Length { constructor(public type: any, public min: number, public max: number) {} check(value: string) { - if (typeof value === "string") return value.length >= this.min && value.length <= this.max; + if (typeof value === "string" || Array.isArray(value)) return value.length >= this.min && value.length <= this.max; if (typeof value === "number" || typeof value === "bigint") return value >= this.min && value <= this.max; return false; } -- cgit 1.5.1