Validate_FI::phoneNumber

Validate_FI::phoneNumber() – Validate Finnish telephone number

Synopsis

require_once 'Validate/FI.php';

bool Validate_FI::phoneNumber ( string $number )

Description

Validate Finnish telephone number.

Simple check: number must be numeric when (, ), -, +, ., ' ' chars are removed and 3-20 digit number.

Parameter

string $number

The telephone number to be validated

Return value

boolean - true if telephone number is valid, false otherwise

Example

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!';
}
?>
Validate Finnish postal code (Previous) Validate Finnish car license plate number (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.