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

Class: Validate_BE

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

Class Overview


Data validation class for Belgium


Author(s):

Version:

  • Release:

Copyright:

  • 2005 The PHP Group

Methods


Inherited Variables

Inherited Methods


Class Details

[line 48]
Data validation class for Belgium

This class provides methods to validate:

  • Postal code
  • Belgian bank code



[ Top ]


Method Detail

bankcode   [line 127]

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 ]

phoneNumber   [line 242]

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


Parameters:

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

[ Top ]

postalCode   [line 92]

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

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

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 14:14:49 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.