Hello all,
Advertising
I'm having this strange behavior, and I do not understanding why...
When I use FILTER_VALIDATE_INT I'm unable to get, on my input box, values
starting with 0(zero), or values that are greater (in length) then 10
digits.
I was expecting to be able to input the all range of integers.
I've tried this:
if (!filter_var($telefone, FILTER_VALIDATE_INT))
{
$erros['telefone'] = 'Invalid Teléfono - Only Numbers Allowed.';
}
And this:
if (!filter_var($telefone, FILTER_VALIDATE_INT, array("options" =>
array("min_range"=>-1, "max_range"=>9999999999999))))
{
$erros['telefone'] = 'Invalid Teléfono - Only Numbers Allowed.';
}
And this:
if (filter_var($telefone, FILTER_VALIDATE_INT, array("options" =>
array("min_range"=>0, "max_range"=>99999999999999999))) == false )
{
$erros['telefone'] = 'Invalid Teléfono - Only Numbers Allowed.';
}
No success. :s
What am I not getting?
Thanks,
Márcio
Ps- Anyone knows where can we grab a good source information about
FILTER_VALIDATE_INT specifically?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php