previousIntroduction (Previous) (Next) Validate_FI::phoneNumbernext

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::postalCode

Validate_FI::postalCode() – Validate Finnish postal code

Synopsis

require_once 'Validate/FI.php';

bool Validate_FI::postalCode ( string $number , bool $strong )

Description

Validate Finnish postal code.

Five digit postal code, maybe with a leading 'FI-' (XXXXX or FI-XXXXX).

An optional parameter for activate strong checks using a list of postcodes (not implemented).

Parameter

string $number

The postal code to be validated

boolean $strong

optional; strong checks (e.g. against a list of postal codes)(not implemented)

Return value

boolean - true if postal code is valid, false otherwise

Example

Using postalCode()

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

$postalCode '00100';
if ( 
Validate_FI::postalCode($postalCode) ) {
    print 
'Valid';
} else {
    print 
'Not valid!';
}
?>
previousIntroduction (Previous) (Next) Validate_FI::phoneNumbernext

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.