diff --git a/src/Fields/Field.php b/src/Fields/Field.php index 3b0fad2bc..ce9523076 100644 --- a/src/Fields/Field.php +++ b/src/Fields/Field.php @@ -842,10 +842,6 @@ protected function guessTypeFromValidationRules(): ?string return 'boolean'; } - if ($this->hasAnyRule($ruleStrings, ['integer', 'int', 'numeric', 'min:', 'max:', 'between:'])) { - return 'number'; - } - if ($this->hasAnyRule($ruleStrings, ['email', 'url', 'ip', 'uuid', 'string', 'regex', 'in', 'array'])) { return 'string'; } @@ -858,6 +854,10 @@ protected function guessTypeFromValidationRules(): ?string return 'string'; // Files are typically handled as strings (paths/URLs) } + if ($this->hasAnyRule($ruleStrings, ['integer', 'int', 'numeric', 'between:'])) { + return 'number'; + } + return null; }