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

Class: Validate_IE

Source Location: /Validate_IE-0.2.0/Validate/IE.php

Class Overview


Data validation class for Ireland


Author(s):

Version:

  • Release: @package_version@

Copyright:

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

Methods


Inherited Variables

Inherited Methods


Class Details

[line 44]
Data validation class for Ireland

This class provides methods to validate:

  • Postal code



[ Top ]


Method Detail

bankAC   [line 329]

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   —  optional $noSort Do not validate the sort codes (default: false)

[ Top ]

drive   [line 308]

bool drive( string $dl)

Validates an Irish driving licence

This function will validate the drivers licence for irish licences.

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

Parameters:

string   $dl   —  The drivers licence to validate

[ Top ]

IBAN   [line 69]

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 ]

passport   [line 285]

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

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.

  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.  ?>

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

Parameters:

string   $number   —  The phone number
bool   $requiredAreaCode   —  defaults to true. If set require area code checking.

[ Top ]

postalCode   [line 268]

bool postalCode( string $postalCode)

Validate postal code

This function validate postal codes in Ireland

  • Return: false .. there's not postal codes in Ireland.
  • Access: public

Parameters:

string   $postalCode   —  The postal code to validate

[ Top ]

ppsn   [line 373]

bool ppsn( $ppsn $ppsn)

Personal Public Service Number

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


Parameters:

$ppsn   $ppsn   —  Personal Public Service Number

[ Top ]

ssn   [line 356]

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

[ Top ]

swift   [line 55]

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 ]


Documentation generated on Mon, 11 Mar 2019 15:02:55 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.