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

Class: Validate_IE

Source Location: /Validate_IE-1.1.0a3/Validate/IE.php

Class Overview


Data validation class for Ireland


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 1997-2008 Agora Production (http://agoraproduction.com)

Methods


Inherited Variables

Inherited Methods


Class Details

[line 40]
Data validation class for Ireland

This class provides methods to validate:

  • Postal code



[ Top ]


Method Detail

bankAC   [line 436]

bool bankAC( string $ac, [string $noSort = false])

Validate a bank account number

This function will validate a bank account number for irish banks.

  • Return: true if the account validates
  • Access: public

Parameters:

string   $ac   —  The account number
string   $noSort   —  Don't validate the sort codes, optional (default: false)

[ Top ]

checkMOD23   [line 479]

boolean checkMOD23( string $value)

Return true if the checksum in the specified PPSN or vat number, without the 'IE' prefix, is valid.
  • Access: public

Parameters:

string   $value   —  Value to perform modulus 23 checksum on.

[ Top ]

drive   [line 350]

bool drive( string $dl)

Validates an Irish driving licence

This function will validate the number on an Irish driving licence.

  • Return: true if it validates false if it doesn't.
  • Access: public

Parameters:

string   $dl   —  The drivers licence to validate

[ Top ]

eircode   [line 289]

bool eircode( string $eircode, [string $dir = null])

Validate an Eircode; Ireland's postcode/zipcode.
  • Access: public

Parameters:

string   $eircode   —  The post code to validate
string   $dir   —  optional; /path/to/data/dir

[ Top ]

IBAN   [line 67]

bool IBAN( string $iban, [string $swift = false])

Validate Irish IBAN
  • Access: public

Parameters:

string   $iban   —  The account number to be validated
string   $swift   —  swift code to compare against IBAN

[ Top ]

licensePlate   [line 368]

bool licensePlate( string $number)

Validate an Irish vehicle's license plate/registration number.
  • Return: true on success; else false.
  • Access: public

Parameters:

string   $number   —  value to validate.

[ Top ]

passport   [line 327]

bool passport( string $pp)

Validate passport

Validate an irish passport number.

  • Return: If the passport number is valid or not.
  • Access: public

Parameters:

string   $pp   —  The passport number to validate.

[ Top ]

phoneNumber   [line 120]

bool phoneNumber( string $number, [bool $requiredAreaCode = true])

Validate an irish phone number

This function validates an irish phone number. You can either use the requiredAreaCode or not. by default this is set to true.

  • Return: true if number is valid, false if not.
  • Access: public

Parameters:

string   $number   —  The phone number
bool   $requiredAreaCode   — 

defaults to true - to require area code checks

  1.  <?php
  2.  // Include the package
  3.  require_once('Validate/IE.php');
  4.  
  5.  $phoneNumber '+353 1 213 4567';
  6.  if (Validate_IE::phoneNumber($phoneNumber) ) {
  7.      print 'Valid';
  8.  else {
  9.      print 'Not valid!';
  10.  }
  11.  $phoneNumber '213 4567';
  12.  if (Validate_IE::phoneNumber($phoneNumberfalse) ) {
  13.      print 'Valid';
  14.  else {
  15.      print 'Not valid!';
  16.  }
  17.  
  18.  ?>


[ Top ]

postalCode   [line 266]

bool postalCode( string $postalCode, [string $dir = null])

Validate postal code

This function validates postal district codes in Dublin. It will be revised when national postal codes are rolled out.


Parameters:

string   $postalCode   —  The postal code to validate
string   $dir   —  optional; /path/to/data/dir

[ Top ]

ppsn   [line 513]

bool ppsn( string $ppsn)

Personal Public Service Number

Ireland does not have a social security number system, the closest equivalent is a Personal Public Service Number.


Parameters:

string   $ppsn   —  Personal Public Service Number

[ Top ]

sortCode   [line 417]

bool sortCode( string $sc)

Validate a sort code, no dashes or whitespace - just digits.
  • Access: public

Parameters:

string   $sc   —  The sort code.

[ Top ]

ssn   [line 464]

bool ssn( string $ssn)

Validate SSN

Ireland does not have a social security number system, the closest equivalent is a Personal Public Service Number.


Parameters:

string   $ssn   —  ssn number to validate

[ Top ]

swift   [line 52]

bool swift( string $swift)

Validate an Irish SWIFT code
  • Return: true if number is valid, false if not.
  • Access: public

Parameters:

string   $swift   —  swift code

[ Top ]

vatNumber   [line 558]

bool vatNumber( string $vat)

Validate Irish VAT registration number.

Parameters:

string   $vat   —  vat number to validate.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 16:03:06 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.