fortress
                                
                                 fortress copied to clipboard
                                
                                    fortress copied to clipboard
                            
                            
                            
                        How to validate bigint (10 digits or more like mobile no)?
Hi!
Greetings!
While validating mobile number (for 10 digits) as integer, it accepts only typical integer value (65535).
Is bigint supported? other than through regex of course.
Was also looking for date, but couldnt find.
Thank you! warm regards and gratitude for the nice framework that saves tons of work. Spurgeon
Oh - interesting! Is it failing in client-side validation, or server-side?
Hi Alex,
Not sure, BTW, how to check?
Validation occurs on form submit, so presume it is server side.
For now, i've used "numeric" in which '9.9' happens to be a valid mobile no!
FYI pl. Thanks!
so it lets you submit the form (showing all fields as green), but then it gives an error? This would be server side, then.
BTW: with issues, you don't need salutations and signatures. Just your comment is enough.
Thanks! Server side.
Ok, so that would be in Valitron, which internally uses FILTER_VALIDATE_INT.
This might be platform dependent, see http://stackoverflow.com/questions/31070807/filter-var-and-validating-integer-values.  One thing that could be done is to explicitly set the minimum and maximum range for integers in the call to filter_var.  See http://php.net/manual/en/filter.filters.validate.php.
Thanks for saving my day!
On Sun, Jul 17, 2016 at 1:48 AM, Alex Weissman [email protected] wrote:
Ok, so that would be in Valitron, which internally uses FILTER_VALIDATE_INT https://github.com/vlucas/valitron/blob/master/src/Valitron/Validator.php#L223-L226 .
This might be platform dependent, see http://stackoverflow.com/questions/31070807/filter-var-and-validating-integer-values. One thing that could be done is to explicitly set the minimum and maximum range for integers in the call to filter_var. See http://php.net/manual/en/filter.filters.validate.php.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/userfrosting/fortress/issues/11#issuecomment-233149046, or mute the thread https://github.com/notifications/unsubscribe-auth/AGbU2XA6qnW88aoJyfx8J0dKDfPUOvWlks5qWTyrgaJpZM4JN-Tk .
No problem - were you able to fix it?  I wonder if Valitron would consider adding explicit values for min_range and max_range.
Not yet.. using 'numeric' for now. will work on this and keep you posted.. :-)