From e8943897324674c030f81a7404b779c9449286b4 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Mon, 22 Feb 2021 17:33:41 +0100 Subject: :sparkles: [Member] pagination --- src/util/instanceOf.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/util/instanceOf.ts') diff --git a/src/util/instanceOf.ts b/src/util/instanceOf.ts index cc373ec1..be7124d4 100644 --- a/src/util/instanceOf.ts +++ b/src/util/instanceOf.ts @@ -51,7 +51,9 @@ export class Length { constructor(public type: any, public min: number, public max: number) {} check(value: string) { - return value.length >= this.min && value.length <= this.max; + if (typeof value === "string") 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