Skip to content

Commit

Permalink
fix: exact_length does not validate int values
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Oct 24, 2023
1 parent 26a3e75 commit ace97aa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions system/Validation/StrictRules/Rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ public function equals($str, string $val): bool
*/
public function exact_length($str, string $val): bool
{
if (is_int($str)) {
$str = (string) $str;
}

if (! is_string($str)) {
return false;
}
Expand Down

0 comments on commit ace97aa

Please sign in to comment.