eee
This commit is contained in:
@@ -139,17 +139,13 @@ class Validator
|
|||||||
throw new \Exception('Fail type value.');
|
throw new \Exception('Fail type value.');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$value = match ($property->getName()) {
|
$this->formData->{$name} = match ($property->getName()) {
|
||||||
'int' => (int)$value,
|
'int' => (int)$value,
|
||||||
'float' => (float)$value,
|
'float' => (float)$value,
|
||||||
'bool' => $value == 'true',
|
'bool' => $value == 'true',
|
||||||
default => $value
|
default => $value
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if ($value === 'Null') {
|
|
||||||
$value = null;
|
|
||||||
}
|
|
||||||
$this->formData->{$name} = $value;
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user