Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate Slider step #12

Open
AkmalFairuz opened this issue Apr 10, 2022 · 1 comment
Open

Validate Slider step #12

AkmalFairuz opened this issue Apr 10, 2022 · 1 comment

Comments

@AkmalFairuz
Copy link

public function validateValue($value) : void{
if(!is_float($value) and !is_int($value)){
throw new FormValidationException("Expected float, got " . gettype($value));
}
if($value < $this->min or $value > $this->max){
throw new FormValidationException("Value $value is out of bounds (min $this->min, max $this->max)");
}
}

@PJZ9n
Copy link

PJZ9n commented Jul 10, 2022

This is related to #13 , but there is an error in floating point numbers ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants