More robust way to check number step [#3433]

This commit is contained in:
Matias Griese 2021-09-02 20:34:17 +03:00
parent 907e46631c
commit 61adb1e6cf

View File

@ -541,7 +541,7 @@ class Validation
// Count of how many steps we are above/below the minimum value.
$pos = ($value - $min) / $step;
return fmod($pos, 1) === 0.0;
return is_int(static::filterNumber($pos, $params, $field));
}
return true;