✨ [Member] pagination

This commit is contained in:
Flam3rboy
2021-02-22 17:33:41 +01:00
parent 0d1f795305
commit e894389732
4 changed files with 43 additions and 17 deletions
+3 -1
View File
@@ -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;
}
}