-
-
Notifications
You must be signed in to change notification settings - Fork 648
Validations #118
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
Validations #118
Conversation
Whoops - commented on the wrong PR - didn't notice you closed it and opened this one instead. Please check the comments on #117 - they all still apply to this one. |
Hey thanks for the tips. New to contributing so appreciate you helping me out. I did the changes and tested. It throws the error if its anything BUT solid numbers, so no periods, commas, percentage signs, and plus signs are able to pass by. |
{ | ||
return $this->assertCallback( | ||
function ($value) { | ||
return (ctype_digit($value) == true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ctype_digit
function already returns a boolean. Change this to return ctype_digit($value);
.
What's wrong with |
We're missing tests. |
I've squashed and merged this. Thanks for the contribution. |
Added integer validations