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

Class: Validate_BE

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

Class Overview


Data validation class for Belgium


Author(s):

Version:

  • Release:@packageversion@

Copyright:

  • 2005 The PHP Group

Methods


Inherited Variables

Inherited Methods


Class Details

[line 56]
Data validation class for Belgium

This class provides methods to validate:

  • Postal code
  • Belgian bank code



[ Top ]


Method Detail

bankCode   [line 201]

bool bankCode( $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
   $bankCode   — 

[ Top ]

bankTransferMessage   [line 229]

bool bankTransferMessage( $bankTransferMessage, string $bankcode)

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   $bankcode   —  Belgian bankcode to validate
   $bankTransferMessage   — 

[ Top ]

nationalId   [line 71]

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 347]

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

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

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


Parameters:

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

[ Top ]

postalCode   [line 165]

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

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)

[ Top ]

ssn   [line 122]

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 258]

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 Thu, 10 Dec 2015 05:40:28 +0000 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.