diff --git a/src/Forms/Elements/Input/Number/NumberInputElement.php b/src/Forms/Elements/Input/Number/NumberInputElement.php index 3b4f1df..dabb7ef 100644 --- a/src/Forms/Elements/Input/Number/NumberInputElement.php +++ b/src/Forms/Elements/Input/Number/NumberInputElement.php @@ -50,7 +50,7 @@ public function name(): string public function handle(ParametersInterface $parameters): ElementValidationResultsCollectionInterface { - $this->setValue($parameters->has($this->name()) ? $parameters->require($this->name()) : 0.0); + $this->setValue($parameters->has($this->name()) ? (float)$parameters->require($this->name()) : 0.0); $this->validationResult = $this->validator->validate($this); return new ElementValidationResultsCollection( new ElementValidationResult($this, $this->validationResult)