-
-
Notifications
You must be signed in to change notification settings - Fork 250
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
integer validation fails for large numbers #300
Comments
That's strange :) Can you share a bit more of your code? |
I know this is happening. It's because of php int range. Which is -2,147,483,647 - 2,147,483,647. |
The problem is that I tested this, and it validates: $v = new \Valitron\Validator([
'num_1'=>'555555555555',
'num_2'=>'2147483648'
]);
$v->rule('integer', ['num_1', 'num_2']);
var_dump($v->validate()); //returns true |
Hi, I get false for the same test. Do you think this might be an issue with the php version of the platform php is on? I am running php 5.6.17 on IIS. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tried to validate
&action=get&id=555555555555
and it fails. But&action=get&id=555
works fine. I keep gettingId must be an integer
The text was updated successfully, but these errors were encountered: