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

Class: Validate_FR

Source Location: /Validate_FR-0.5.2/Validate/FR.php

Class Overview


Data validation class for France


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 1997-2005 Pierre-Alain Joye, Bertrand Gugger

Methods


Inherited Variables

Inherited Methods


Class Details

[line 59]
Data validation class for France

This class provides methods to validate:

  • Social insurance number (aka SSN)
  • French RIB
  • French SIREN number
  • French SIRET number
  • Postal code
  • French "departement"



[ Top ]


Method Detail

postalCode   [line 252]

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

Validates a French Postal Code format
  • Return: TRUE if code is valid, FALSE otherwise
  • Todo: Validate against department
  • Static: This method can be called statically
  • Access: public

Parameters:

string   $postalCode     the code to validate
bool   $strong     optional; strong checks (e.g. against a list of postcodes) (not implanted)

[ Top ]

region   [line 264]

bool region( string $region)

Validates a French "departement"
  • Return: Whether the department is valid
  • Static: This method can be called statically

Parameters:

string   $region     2-digit department number

[ Top ]

rib   [line 133]

bool rib( mixed $rib, string $aCodeBanque, string $aCodeGuichet, string $aNoCompte, string $number)

Validate a french RIB see http://www.ecbs.org/Download/Tr201v3.9.pdf

Parameters:

string   $aCodeBanque     number or an array containaing the 'number'=>1234
string   $aCodeGuichet     number or an array containaing the 'number'=>1234
string   $aNoCompte     number or an array containaing the 'number'=>1234
string   $number     number or an array containaing the 'number'=>1234

[ Top ]

siren   [line 181]

bool siren( string $siren)

Validate a french SIREN number see http://xml.insee.fr/schema/siret.html

Parameters:

string   $siren     number or an array containaing the 'number'=>1234

[ Top ]

siret   [line 212]

bool siret( string $siret)

Validate a french SIRET number see http://xml.insee.fr/schema/siret.html

Parameters:

string   $siret     number or an array containaing the 'number'=>1234

[ Top ]

ssn   [line 75]

bool ssn( mixed $ssn, string $number)

Validate a french SSN

TO DO : strong validation against the INSEE cities databases (rpc or local DB)

This function checks given number according the specs available here: http://www.dads.cnav.fr/tds/Stru0103.htm http://xml.insee.fr/schema/nir.html


Parameters:

string   $number     number or an array containaing the 'number'=>1234

[ Top ]


Documentation generated on Tue, 18 Apr 2006 13:32:09 -0400 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.