Skip to content

Commit

Permalink
Remove character length limit in IsFloat and IsInt test functions (#179)
Browse files Browse the repository at this point in the history
The character length constraints previously set on the testValue method
in the IsFloat and IsInt classes have been removed. This change ensures
that the functions can validate floats and integers of any length.
  • Loading branch information
SmetDenis committed Apr 19, 2024
1 parent e87a23b commit e2b681b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
5 changes: 0 additions & 5 deletions src/Rules/Cell/IsFloat.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ public function validateRule(string $cellValue): ?string

public static function testValue(string $cellValue): bool
{
$maxLimit = 18;
if (\strlen($cellValue) > $maxLimit) {
return false;
}

return Validator::floatVal()->validate($cellValue);
}
}
5 changes: 0 additions & 5 deletions src/Rules/Cell/IsInt.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ public function validateRule(string $cellValue): ?string

public static function testValue(string $cellValue): bool
{
$maxLimit = 19;
if (\strlen($cellValue) > $maxLimit) {
return false;
}

return Validator::intVal()->validate($cellValue);
}
}

0 comments on commit e2b681b

Please sign in to comment.