diff --git a/src/validation/rules.ts b/src/validation/rules.ts index 3ee278b..fff2b79 100644 --- a/src/validation/rules.ts +++ b/src/validation/rules.ts @@ -165,7 +165,7 @@ const rules: Record = { } if (typeof value === 'string' || (force === 'length')) { - value = !isNaN(value) ? value.toString() : value + value = !isNaN(value) ? String(value) : value return value.length <= maximum } @@ -187,7 +187,7 @@ const rules: Record = { } if (typeof value === 'string' || (force === 'length')) { - value = !isNaN(value) ? value.toString() : value + value = !isNaN(value) ? String(value) : value return value.length >= minimum }