I am using the PHP filter_validate_int
to perform a simple telephone validation. The length should be exactly 10 chars and all should be numeric. However as most of the telephone numbers start with a 0. The filter validate int function return false. Is there anyway to resolve this issue. Here is the code that I have used
if(!filter_var($value, FILTER_VALIDATE_INT) || strlen($value) != 10) return false;
filter_validate_int
function. Can you show us the code of that function. – Undamped