From f23efc5823132b33830e18e60f03f7f19b382a37 Mon Sep 17 00:00:00 2001 From: whwyy Date: Mon, 4 Dec 2023 23:26:57 +0800 Subject: [PATCH] eee --- src/Validator/Validator.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Validator/Validator.php b/src/Validator/Validator.php index 3b6e114..72bbb86 100644 --- a/src/Validator/Validator.php +++ b/src/Validator/Validator.php @@ -139,17 +139,13 @@ class Validator throw new \Exception('Fail type value.'); } } else { - $value = match ($property->getName()) { + $this->formData->{$name} = match ($property->getName()) { 'int' => (int)$value, 'float' => (float)$value, 'bool' => $value == 'true', default => $value }; } - if ($value === 'Null') { - $value = null; - } - $this->formData->{$name} = $value; } return true; }