Validate_BE
[ class tree: Validate_BE ] [ index: Validate_BE ] [ all elements ]

Class: Validate_BE

Source Location: /Validate_BE-0.1.4/Validate/BE.php

Class Overview


Data validation class for Belgium


Author(s):

Version:

  • Release:@packageversion@

Copyright:

  • 1997-2005 Christophe Gesché

Methods


Inherited Variables

Inherited Methods


Class Details

[line 57]
Data validation class for Belgium

This class provides methods to validate:

  • Postal code
  • Belgian bank code



[ Top ]


Method Detail

bankCode   [line 224]

bool bankCode( string $bankCode)

Validate a Belgian bank account number

Belgian bankcodes consist of

  • 3-figure number for the bank socity
  • 7-figure number for the account number
  • 2-figure number for mod 97

  • Return: true if bankcode is ok, false otherwise

Parameters:

string   $bankCode     Belgian bankcode to validate

[ Top ]

bankTransferMessage   [line 252]

bool bankTransferMessage( string $bankTransferMessage)

Validate a Belgian transfert message

Belgian transfert (virement) can be done with a structured message 12 figure -10-figure number for the message

  • 2-figure number for mod 97

  • Return: true if bankcode is ok, false otherwise

Parameters:

string   $bankTransferMessage     Belgian bankcode to validate

[ Top ]

nationalId   [line 73]

bool nationalId( string $nationalId)

Validate a Belgian social security number

The belgian social security number is on the SIS card of all belgian.

A check digit is the last one, computed the standard _get_control_number function.

  • Return: true on success
  • Access: public

Parameters:

string   $nationalId     ssn to validate

[ Top ]

phoneNumber   [line 377]

bool phoneNumber( string $phonenumber, [int $type = VALIDATE_BE_PHONENUMBER_TYPE_ANY])

Validate a phonenumber

065 12 34 56 02 123 45 67 O485 12 34 56 00 32 65 12 34 56 00 32 2 123 45 67 00 32 485 12 34 56

  • 32 65 12 34 56
  • 32 2 123 45 67
  • 32 485 12 34 56
  • + 32 65 12 34 56
  • + 32 2 123 45 67
  • + 32 485 12 34 56
010 Waver 011 Hasselt 012 Tongeren 013 Diest 014 Herentals, Turnhout 015 Mechelen 016 Leuven, Tienen 019 Borgworm (Frans: Waremme) 02 Brussel 03 Antwerpen 04 Luik 050 Brugge, Zeebrugge 051 Roeselare 052 Dendermonde 053 Aalst 054 Ninove 055 Ronse 056 Kortrijk, Komen-Waasten 057 Ieper 058 Veurne 059 Oostende 060 Chimay 061 Libramont-Chevigny 063 Aarlen 064 La Louvière 065 Bergen (Frans: Mons) 067 Nijvel 068 Ath 069 Doornik 071 Charleroi 080 Stavelot 081 Namen 082 Dinant 083 Ciney 084 Marche-en-Famenne 085 Hoei 086 Durbuy 087 Verviers 089 Genk 09 Gent

0472-0479 mobiel (Proximus) 0485-0486 mobiel (Base) 0494-0499 mobiel (Mobistar)

070 commercieel 0800 gratis 0900-0905 commercieel

NOTE : this validate want a BELGIAN phonenumber to return true, not a valid number to call FROM belgium


Parameters:

string   $phonenumber     Belgian phonenumber (can be in international format (eg +32 or 0032)
int   $type     Type of phonenumber to check / to attempt

[ Top ]

postalCode   [line 175]

bool postalCode( string $postcode, [bool $strong = false], [string $dataDir = null])

Validate a Belgian postcode
  • Return: true if postcode is ok, false otherwise

Parameters:

string   $postcode     postcode to validate
bool   $strong     optional; strong checks (e.g. against a list of postcodes)
string   $dataDir     optional; name of directory datafile can be found in. set during install process but may be overridden.

[ Top ]

ssn   [line 126]

bool ssn( string $ssn)

Validate a Belgian social security number

The belgian social security number is on the SIS card of all belgian.

A check digit is the last one, computed the standard _get_control_number function.

  • Return: true on success
  • Access: public

Parameters:

string   $ssn     ssn to validate

[ Top ]

vat   [line 285]

bool vat( string $vat)

Validate a VAT account number

Belgian VAT consist of

  • 3-figure number
Actually no doc was found about a checksum

  • Return: true if VAT is ok, false otherwise

Parameters:

string   $vat     Belgian VAT to validate

[ Top ]


Documentation generated on Mon, 23 Mar 2009 02:00:02 +0000 by phpDocumentor 1.4.2. PEAR Logo Copyright © PHP Group 2004.