summary refs log tree commit diff
path: root/src/util/instanceOf.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/instanceOf.ts')
-rw-r--r--src/util/instanceOf.ts2
1 files changed, 1 insertions, 1 deletions
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; }