Skip to content

Commit 391723b

Browse files
committed
fix: exact_length does not validate int values
1 parent 26a3e75 commit 391723b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

system/Validation/StrictRules/Rules.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ public function equals($str, string $val): bool
6363
*/
6464
public function exact_length($str, string $val): bool
6565
{
66+
if (is_int($str) || is_float($str)) {
67+
$str = (string) $str;
68+
}
69+
6670
if (! is_string($str)) {
6771
return false;
6872
}

0 commit comments

Comments
 (0)