diff --git a/CHANGELOG.md b/CHANGELOG.md index 674badd29..4bc53f629 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# v1.7.44 +## 10/02/2023 + +1. [](#bugfix) + * Fixed a math rounding issue with number validation when using floating point steps [#3761](https://github.com/getgrav/grav/issues/3761) + # v1.7.43 ## 10/02/2023 diff --git a/system/src/Grav/Common/Data/Validation.php b/system/src/Grav/Common/Data/Validation.php index daca7352f..ea8ef2a0a 100644 --- a/system/src/Grav/Common/Data/Validation.php +++ b/system/src/Grav/Common/Data/Validation.php @@ -550,7 +550,7 @@ class Validation $step = (float)$params['step']; // Count of how many steps we are above/below the minimum value. $pos = ($value - $min) / $step; - + $pos = round($pos, 10); return is_int(static::filterNumber($pos, $params, $field)); }