previousValidate_FI::phoneNumber (Previous) (Next) Validate_FI::bikeLicensePlatenext

View this page in Last updated: Sun, 18 Oct 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

Validate_FI::carLicensePlate

Validate_FI::carLicensePlate() – Validate Finnish car license plate number

Synopsis

require_once 'Validate/FI.php';

bool Validate_FI::carLicensePlate ( string $number )

Description

Validate Finnish car license plate number. Format: AAA-XXX, CD-XXXX or C-XXXXX. First or only number cannot be zero.

AAA-XXX: AAA is 2-3 letters UPPERCASE A-Z + ÅÄÖ and XXX is 1-3 numbers.

CD-XXXX: CD- and XXXX is 1-4 numbers (diplomat licence plate).

C-XXXXX: C- and XXXXX is 1-5 numbers (other tax-free diplomat licence plate).

Parameter

string $number

The license plate number to be validated

Return value

boolean - true if license plate number is valid, false otherwise

Example

Using carLicensePlate()

<?php
// Include the package
require_once 'Validate/FI.php';

$carLicensePlate 'ABC-123';
if ( 
Validate_FI::carLicensePlate($carLicensePlate) ) {
    print 
'Valid';
} else {
    print 
'Not valid!';
}
?>
previousValidate_FI::phoneNumber (Previous) (Next) Validate_FI::bikeLicensePlatenext

Download Documentation Last updated: Sun, 18 Oct 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.