Skip to content

Commit 7ff7d04

Browse files
committed
TextInput: Reverts, validators FLOAT doesn't automatically sets type to 'number'
1 parent ed7ecd7 commit 7ff7d04

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Forms/Controls/TextInput.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ public function getControl()
6262
foreach ($this->getRules() as $rule) {
6363
if ($rule->isNegative || $rule->branch) {
6464

65-
} elseif ($input->type === NULL && in_array($rule->validator, [Form::EMAIL, Form::URL, Form::INTEGER, Form::FLOAT], TRUE)) {
66-
static $types = [Form::EMAIL => 'email', Form::URL => 'url', Form::INTEGER => 'number', Form::FLOAT => 'number'];
65+
} elseif ($input->type === NULL && in_array($rule->validator, [Form::EMAIL, Form::URL, Form::INTEGER], TRUE)) {
66+
static $types = [Form::EMAIL => 'email', Form::URL => 'url', Form::INTEGER => 'number'];
6767
$input->type = $types[$rule->validator];
6868

6969
} elseif (in_array($rule->validator, [Form::MIN, Form::MAX, Form::RANGE], TRUE)

0 commit comments

Comments
 (0)