Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/dktapps/pmforms/element/Slider.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ public function validateValue($value) : void{
if($value < $this->min or $value > $this->max){
throw new FormValidationException("Value $value is out of bounds (min $this->min, max $this->max)");
}
if($value !== 0 and fmod((float)$value, $this->step) !== (float)0){//do not use % operator
throw new FormValidationException("Value $value is not divisible by step ($this->step)");
}
}

public function getMin() : float{
Expand Down