Skip to content

Commit 9a669d1

Browse files
authored
Adjust Number Filter - Convert Value to Float If All Digits
1 parent a7521b9 commit 9a669d1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Views/Filters/NumberFilter.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ public function validate(float|int|string|array $value): float|int|string|false
2323
return (float) $value;
2424
} elseif (is_int($value)) {
2525
return (int) $value;
26+
} else if (ctype_digit($value)) {
27+
return (float) $value;
2628
}
27-
2829
return false;
30+
2931
}
3032
}

0 commit comments

Comments
 (0)