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@

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

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, 11 Mar 2019 15:30:24 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.