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

Class: Validate_NZ

Source Location: /Validate_NZ-0.1.1/Validate/NZ.php

Class Overview


Data validation class for New Zealand


Author(s):

Copyright:

  • (c) 2006 Byron Adams

Methods


Inherited Variables

Inherited Methods


Class Details

[line 34]
Data validation class for New Zealand

This class provides methods to validate:

  • IRD numbers
  • Regional codes
  • Telephone number
  • Postal code
  • Bank AC



[ Top ]


Method Detail

bankCode   [line 216]

bool bankCode( $bankcode, string $Value)

Validates a New Zealand Bank Account Number

This function checks wheather the given value is a valid New Zealand bank account number. allows several formats.


Parameters:

string   $Value   —  number to validate
   $bankcode   — 

[ Top ]

phoneNumber   [line 157]

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

Validates a New Zealand phone number

This function validates all New Zealand phone numbers checks for landline,0800,0900,0508,021,027 and 025 numbers allows for various combinations with spaces dashes and parentheses.

  • Link:

Parameters:

string   $number,   —  the number to validate
   $number   — 
   $requireAreaCode   — 

[ Top ]

postalCode   [line 46]

bool postalCode( $postcode, [ $strong = true], string $postcode,, bool $strong,)

Validate New Zealand postal codes

Parameters:

string   $postcode,   —  postcode to validate
bool   $strong,   —  optional; strong checks against a list of postcodes
   $postcode   — 
   $strong   — 

[ Top ]

region   [line 113]

bool region( $region, string $region,)

Validates a New Zealand Regional Code

Parameters:

string   $region,   —  regional code to validate
   $region   — 

[ Top ]

ssn   [line 83]

bool ssn( $ssn, string $ssn;)

Validates a New Zealand IRD Number (ssn equiv)

recently the format has changed to having a prefix of 0, this will work with both new and old IRD numbers.


Parameters:

string   $ssn;   —  IRD number to validate
   $ssn   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:41:42 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.