Step validator is not working properly. For example if I set baseValue = 50 and step = 0.01 then the validation fails for the value of 50.09, which is perfectly valid. I think the problem is in the calculation of the fmod:
In this example $value - $this->baseValue == 0.090000000000003 and then $fmod == 3.41E-15. Maybe it the fmod is rounded to the precision of the step the issue will be fixed.
Step validator is not working properly. For example if I set
baseValue = 50
andstep = 0.01
then the validation fails for the value of50.09
, which is perfectly valid. I think the problem is in the calculation of thefmod
:$fmod = $this->fmod($value - $this->baseValue, $this->step);
In this example
$value - $this->baseValue == 0.090000000000003
and then$fmod == 3.41E-15
. Maybe it the fmod is rounded to the precision of the step the issue will be fixed.I'm using PHP 5.6.33