fix: Fixed toString calls in validators
This commit is contained in:
parent
76dec48d64
commit
da56b04213
@ -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…
Reference in New Issue
Block a user