diff --git a/src/Validation/InputValidator.php b/src/Validation/InputValidator.php index cb326b1..c8d49b4 100644 --- a/src/Validation/InputValidator.php +++ b/src/Validation/InputValidator.php @@ -76,17 +76,17 @@ public function transformType($value, $expectedType = null): mixed } // no break case InputType::INTEGER: - if (is_numeric($value)) { + if (is_numeric($value) || $value === '') { settype($value, 'integer'); } break; case InputType::DOUBLE: - if (is_numeric($value)) { + if (is_numeric($value) || $value === '') { settype($value, 'double'); } break; case InputType::FLOAT: - if (is_numeric($value)) { + if (is_numeric($value) || $value === '') { settype($value, 'float'); } break;