fix: Fixed toString calls in validators
This commit is contained in:
parent
76dec48d64
commit
da56b04213
1 changed files with 2 additions and 2 deletions
|
@ -165,7 +165,7 @@ const rules: Record<string, ValidationRuleFn> = {
|
|||
}
|
||||
|
||||
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<string, ValidationRuleFn> = {
|
|||
}
|
||||
|
||||
if (typeof value === 'string' || (force === 'length')) {
|
||||
value = !isNaN(value) ? value.toString() : value
|
||||
value = !isNaN(value) ? String(value) : value
|
||||
return value.length >= minimum
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue