Jump to content

Looking to validate an integer up to 20 digits length


JeremyCanada26

Recommended Posts

I have an integer that I'd like to validate to ensure that it is a valid number between 1 and 99999999999999999999(20 digits).

 

I'm thinking about using the following, but I'm not sure what the max range is on the FILTER_VALIDATE_INT options.

 

return filter_var($_REQUEST['r'], FILTER_VALIDATE_INT, array("options" => array("min_range"=>1, "max_range"=>99999999999999999999)));

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.