mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
validaiton math rounding - fixes #3761
This commit is contained in:
parent
45f8fe4d0b
commit
6d5f0ff9ba
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user