bool Validate_FI::phoneNumber
(
string $number
)
Validate Finnish telephone number.
Simple check: number must be numeric when (, ), -, +, ., ' ' chars are removed and 3-20 digit number.
$number
The telephone number to be validated
boolean - true if telephone number is valid, false otherwise
Using phoneNumber()
<?php
// Include the package
require_once 'Validate/FI.php';
$phoneNumber = '+358 40 1234567';
if ( Validate_FI::phoneNumber($phoneNumber) ) {
print 'Valid';
} else {
print 'Not valid!';
}
?>