This commit is contained in:
2023-12-04 23:26:57 +08:00
parent 013d570eb7
commit f23efc5823
+1 -5
View File
@@ -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;
}