Permalink
Browse files

Shifted Validate_AU to seperate location

  • Loading branch information...
1 parent 0dfa377 commit 11b84d24056c9517119ce13893ed2d2e11d44885 @CloCkWeRX CloCkWeRX committed Nov 26, 2011
Showing with 0 additions and 4,182 deletions.
  1. +0 −339 Validate/AU.php
  2. +0 −3,316 data/AU_postcodes.txt
  3. +0 −104 docs/validate_au_fetch_postcodes.php
  4. +0 −115 package_AU.xml
  5. +0 −308 tests/validate_AU.phpt
View
339 Validate/AU.php
@@ -1,339 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-/**
- * Specific validation methods for data used in Australia
- *
- * PHP Versions 4 and 5
- *
- * This source file is subject to the New BSD license, That is bundled
- * with this package in the file LICENSE, and is available through
- * the world-wide-web at
- * http://www.opensource.org/licenses/bsd-license.php
- * If you did not receive a copy of the new BSDlicense and are unable
- * to obtain it through the world-wide-web, please send a note to
- * pajoye@php.net so we can mail you a copy immediately.
- *
- * @category Validate
- * @package Validate_AU
- * @author Daniel O'Connor <daniel.oconnor@gmail.com>
- * @author Tho Nguyen <tho.nguyen@itexperts.com.au>
- * @author Alex Hayes <ahayes@wcg.net.au>
- * @author Byron Adams <byron.adams54@gmail.com>
- * @copyright 1997-2005 Daniel O'Connor
- * @copyright 2006 Alex Hayes
- * @copyright 2006 Byron Adams
- * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/Validate_AU
- */
-
-/**
- * Data validation class for Australia
- *
- * Contains code from Validate_AT, Validate_UK and Validate_NZ
- *
- * This class provides methods to validate:
- * - Postal code
- * - Phone number
- * - Australian Business Number
- * - Australian Company Number
- * - Tax File Number
- * - Australian Regional codes
- *
- * @category Validate
- * @package Validate_AU
- * @author Daniel O'Connor <daniel.oconnor@gmail.com>
- * @author Tho Nguyen <tho.nguyen@itexperts.com.au>
- * @author Alex Hayes <ahayes@wcg.net.au>
- * @author Byron Adams <byron.adams54@gmail.com>
- * @copyright 1997-2005 Daniel O'Connor
- * @copyright 2006 Alex Hayes
- * @copyright 2006 Byron Adams
- * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: @package_version@
- * @link http://pear.php.net/package/Validate_AU
- */
-
-class Validate_AU
-{
-
- /**
- * Validate Austrialian postal codes.
- *
- * @param string $postcode postcode to validate
- * @param bool $strong optional; strong checks against a list of postcodes
- * @param string $dataDir optional; name of directory datafile is located in
- *
- * @access public
- * @static string $postcodes
- * @return bool true if postcode is ok, false otherwise
- */
- function postalCode($postcode, $strong = false, $dataDir = null)
- {
- if ($strong) {
- static $postcodes;
-
- if (!isset($postcodes)) {
- if ($dataDir != null && (is_file($dataDir . '/AU_postcodes.txt'))) {
- $file = $dataDir . '/AU_postcodes.txt';
- } else {
- $file = '@DATADIR@/Validate_AU/data/AU_postcodes.txt';
- }
- $postcodes = array_map('trim', file($file));
- }
-
- return in_array((string)$postcode, $postcodes, true);
- }
- return preg_match('(^[0-9]{4}$)', $postcode);
- }
-
- /**
- * Validates Australian Regional Codes
- *
- * @param string $region regional code to validate
- *
- * @access public
- * @static array $regions
- * @return bool Returns true on success, false otherwise
- */
- function region($region)
- {
- static $regions = array("ACT", "NSW", "NT", "QLD", "SA", "TAS", "VIC", "WA");
- return in_array(strtoupper($region), $regions);
- }
-
- /**
- * Validate a telephone number.
- *
- * Note that this function supports the following notations:
- *
- * - Landline: 03 9999 9999
- * - Mobile: 0400 000 000 (as above, but usually notated differently)
- * - Indial: 131 812 / 1300 000 000 / 1800 000 000 / 1900 000 000
- * - International: +61.3 9999 9999
- *
- * For International numbers, only +61 will be valid, as this is
- * Australia's dial code, and the format MUST be +61.3, where 3 represents
- * the state dial code, in this case, Victoria.
- *
- * Note: If the VALIDATE_AU_PHONENUMBER_STRICT flag is not supplied, then
- * all spaces, dashes and parenthesis are removed before validation. You
- * will have to strip these yourself if your data storage does not allow
- * these characters.
- *
- * @param string $number The telephone number
- * @param mixed[] $options A list of options
- * 'strict' => true - do not common characters
- * 'national' => true - validate national numbers
- * 'indial' => true - 13, 1300, 1800, 1900
- * numbers
- * 'other' => true - uncommon phone validations
- * like premium sms, data and personal numbers
- * 'international => true - international numbers
- * for Australia (eg. +61.3 9999 9999)
- *
- * @static
- * @access public
- * @return bool
- *
- * @todo Check that $flags contains a valid flag.
- */
- function phoneNumber($number, $options = array('strict' => false,
- 'national' => true,
- 'indial' => true,
- 'international' => true,
- 'other' => true))
- {
-
- $preg = array();
- if (empty($options['strict'])) {
- $number = str_replace(array('(', ')', '-', ' '), '', $number);
- }
-
- if (!empty($options['national'])) {
- $preg[] = "(0[3478][0-9]{8})";
- $preg[] = "(02[3-9][0-9]{7})";
- }
-
- if (!empty($options['indial'])) {
- $preg[] = '(13[0-9]{4})';
- $preg[] = "(1[3|8|9]00[0-9]{6})";
- }
-
- if (!empty($options['international'])) {
- $preg[] = "(\+61\.[23478][0-9]{8})";
- }
-
- //Other numbers, like premium SMS
- if (!empty($options['other'])) {
-
- //Premium SMS
- $preg[] = "(19[0-9]{4,6})";
-
- //Universial Personal Phones
- $preg[] = "(0550[0-9]{6})"; //VOIP range (proposed)
- $preg[] = "(059[0-9]{7})"; //Enum testing numbers
- $preg[] = "(0500[0-9]{6})"; //"Find me anywhere"
- //(divert the number and
- // the caller pays the bill)
-
-
-
- //Data access providers
- $preg[] = "(0198[0-3][0-9]{5})";
-
- }
-
- if (!empty($preg)) {
- foreach ($preg as $pattern) {
- if (preg_match("/^" . $pattern . "$/", $number)) {
- return true;
- }
- }
- }
-
- return false;
-
- }
-
- /**
- * Validate an Australian Company Number (ACN)
- *
- * The ACN is a nine digit number with the last digit
- * being a check digit calculated using a modified
- * modulus 10 calculation.
- *
- * @param string $acn ACN number to validate
- *
- * @access public
- * @return bool Returns true on success, false otherwise
- * @link http://www.asic.gov.au/asic/asic_infoco.nsf/byheadline/Australian+Company+Number+(ACN)+Check+Digit
- */
- function acn($acn)
- {
- $weights = array(8, 7, 6, 5, 4, 3, 2, 1, 0);
-
- $acn = preg_replace("/[^\d]/", "", $acn);
- $digits = str_split($acn);
- $sum = 0;
-
- if (!ctype_digit($acn) || strlen($acn) != 9) {
- return false;
- }
-
- foreach ($digits as $key => $digit) {
- $sum += $digit * $weights[$key];
- }
-
- $remainder = $sum % 10;
-
- switch ($remainder) {
- case 0:
- $complement = 0 - $remainder;
- break;
- default:
- $complement = 10 - $remainder;
- break;
- }
-
- return ($digits[8] == $complement);
- }
-
- /**
- * Social Security Number.
- *
- * Australia does not have a social security number system,
- * the closest equivalent is a Tax File Number
- *
- * @param string $ssn ssn number to validate
- *
- * @access public
- * @see Validate_AU::tfn()
- * @return bool Returns true on success, false otherwise
- */
- function ssn($ssn)
- {
- return Validate_AU::tfn($ssn);
- }
-
- /**
- * Tax File Number (TFN)
- *
- * Australia does not have a social security number system,
- * the closest equivalent is a Tax File Number.
- *
- * @param string $tfn Tax File Number
- *
- * @access public
- * @return bool Returns true on success, false otherwise
- * @link http://en.wikipedia.org/wiki/Tax_File_Number
- */
- function tfn($tfn)
- {
- $weights = array(1, 4, 3, 7, 5, 8, 6, 9, 10);
- $length = array("8", "9");
-
- $tfn = preg_replace("/[^\d]/", "", $tfn);
- $tfn = str_split($tfn);
-
- return Validate_AU::checkDigit($tfn, 11, $weights, $length);
- }
-
- /**
- * Australian Business Number (ABN).
- *
- * Validates an ABN using a modulus calculation
- *
- * @param string $abn ABN to validate
- *
- * @static
- * @access public
- * @return bool true on success, otherwise false
- * @link http://www.ato.gov.au/businesses/content.asp?doc=/content/13187.htm
- */
- function abn($abn)
- {
- $weights = array(10, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19);
- $length = array("11");
-
- $abn = preg_replace("/[^\d]/", "", $abn);
- $abn = str_split($abn);
- $abn[0]--;
-
- return Validate_AU::checkDigit($abn, 89, $weights, $length);
- }
-
- /**
- * Validate number against decimal checksum (check digit)
- *
- * A check digit is a form of redundancy check used
- * for error detection, the decimal equivalent of a
- * binary checksum. It consists of a single digit
- * computed from the other digits in the message.
- *
- * @param array $digits Digits to check
- * @param int $modulus Modulus
- * @param array $weights Array containing weighting
- * @param array $length Length
- *
- * @access public
- * @return bool true on success, otherwise false
- * @link http://en.wikipedia.org/wiki/Check_digit
- */
- function checkDigit($digits, $modulus, $weights, $length)
- {
- $sum = 0;
-
- if (!in_array(count($digits), $length)) {
- return false;
- }
-
- foreach ($digits as $key => $digit) {
- $sum += $digit * $weights[$key];
- }
-
- return !($sum % $modulus);
-
- }
-}
-?>
View
3,316 data/AU_postcodes.txt
0 additions, 3,316 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
104 docs/validate_au_fetch_postcodes.php
@@ -1,104 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-/**
- * Australian postcode list of PEAR Validate_AU postcodes.txt conversion script
- *
- * Converts the Australia Post postcode list from
- * http://www1.auspost.com.au/download/pc-full.zip to the PEAR Validate_AU
- * postcodes.txt list format.
- *
- * PHP Versions 4 and 5
- *
- * This source file is subject to the New BSD license, That is bundled
- * with this package in the file LICENSE, and is available through
- * the world-wide-web at
- * http://www.opensource.org/licenses/bsd-license.php
- * If you did not receive a copy of the new BSDlicense and are unable
- * to obtain it through the world-wide-web, please send a note to
- * pajoye@php.net so we can mail you a copy immediately.
- *
- * @category Validate
- * @package Validate_AU
- * @author Dave Hall <dave.hall@skwashd.com>
- * @copyright 2008 Dave Hall
- * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/Validate_AU
- */
-
-function main() {
-
- // Download
- $source = file_get_contents('http://www1.auspost.com.au/download/pc-full.zip');
-
- if (!is_writable(dirname(__FILE__))) {
- die("I can't write to " . dirname(__FILE__));
- }
-
- $path = dirname(__FILE__) . '/pc-full.zip';
- if (!file_put_contents($path, $source)) {
- die("Failed to write archive to " . $path);
- }
-
- $fp = fopen($path, 'r');
-
- if (!$fp) {
- die("Couldn't read " . $path);
- }
-
- //Extract
- $zip = new ZipArchive;
- if (!$zip->open($path)) {
- die("Couldn't read zip " . $path);
- }
-
- $postcode_path = dirname(__FILE__) . '/postcodes';
- $zip->extractTo($postcode_path);
- $zip->close();
-
- $dir = new DirectoryIterator($postcode_path);
-
- foreach ($dir as $file) {
- if (!is_file($file)) {
- continue;
- }
-
- $postcodes = fetch_postcodes_from_file(fopen((string)$file, 'r'));
-
-
- sort($postcodes, SORT_NUMERIC);
-var_dump($postcodes);
- print implode("\n", $postcodes);
-
- //unlink($postcode_path . '/' . (string)$file);
- }
-}
-
-/**
- * Read a file pointer and preg match it for valid
- * postcodes
- *
- * @param resource $fp File to read
- *
- * return string[]
- */
-function fetch_postcodes_from_file($fp) {
-
- $postcodes = array();
- while ($data = fgetcsv($fp)) {
- $line = fgets($fp, 1024);
-
- $m = array();
- preg_match('/^"([\d]{4})"/', $line, $m);
- if (count($m)) {
- $postcodes[] = $m[1];
- }
- }
-
- return array_unique($postcodes);
-}
-
-
-main();
-?>
-
View
115 package_AU.xml
@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<package packagerversion="1.7.1" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
- <name>Validate_AU</name>
- <channel>pear.php.net</channel>
- <summary>Data validation class for Australia.</summary>
- <description>Package containes locale validation for AU such as:
- * Phone Number
- * Postal Code
- * Tax File Number
- * Australian Business Number
- * Australian Company Number
- * Australian Regional Codes</description>
- <lead>
- <name>Alex Hayes</name>
- <user>ahayes</user>
- <email>ahayes@wcg.net.au</email>
- <active>no</active>
- </lead>
- <lead>
- <name>Byron Adams</name>
- <user>badams</user>
- <email>byron.adams54@gmail.com</email>
- <active>no</active>
- </lead>
- <lead>
- <name>Daniel O&apos;Connor</name>
- <user>doconnor</user>
- <email>daniel.oconnor@gmail.com</email>
- <active>yes</active>
- </lead>
- <date>2008-12-30</date>
- <time>04:30:00</time>
- <version>
- <release>0.1.4</release>
- <api>0.1.1</api>
- </version>
- <stability>
- <release>alpha</release>
- <api>alpha</api>
- </stability>
- <license uri="http://www.opensource.org/licenses/bsd-license.php">BSD License</license>
- <notes>Bug #15454 - Updated postcode listings.</notes>
- <contents>
- <dir name="/">
- <file name="Validate/AU.php" role="php">
- <tasks:replace from="@PACKAGE-VER@" to="version" type="package-info" />
- <tasks:replace from="@DATADIR@" to="data_dir" type="pear-config" />
- </file>
- <file name="tests/validate_functions.inc" role="test" />
- <file name="tests/validate_AU.phpt" role="test" />
- <file name="data/AU_postcodes.txt" role="data" />
- <file name="LICENSE" role="doc" />
- </dir>
- </contents>
- <dependencies>
- <required>
- <php>
- <min>4.2.0</min>
- <max>6.0.0</max>
- </php>
- <pearinstaller>
- <min>1.4.9</min>
- </pearinstaller>
- <package>
- <name>Validate</name>
- <channel>pear.php.net</channel>
- <min>0.5.0</min>
- <recommended>0.5.0</recommended>
- </package>
- </required>
- </dependencies>
- <phprelease />
- <changelog>
- <release>
- <version>
- <release>0.1.2</release>
- <api>0.1.1</api>
- </version>
- <stability>
- <release>alpha</release>
- <api>alpha</api>
- </stability>
- <date>2008-10-27</date>
- <license uri="http://www.opensource.org/licenses/bsd-license.php">BSD License</license>
- <notes>Bug #14320 - Strict validation now expects '0800' as a valid post code.</notes>
- </release>
- <release>
- <version>
- <release>0.1.1</release>
- <api>0.1.1</api>
- </version>
- <stability>
- <release>alpha</release>
- <api>alpha</api>
- </stability>
- <date>2008-04-22</date>
- <license uri="http://www.opensource.org/licenses/bsd-license.php">BSD License</license>
- <notes>- Bug #13111 phoneNumber() tests inaccurate (changes API)</notes>
- </release>
- <release>
- <version>
- <release>0.1.0</release>
- <api>0.1.0</api>
- </version>
- <stability>
- <release>alpha</release>
- <api>alpha</api>
- </stability>
- <date>2006-10-10</date>
- <license uri="http://www.opensource.org/licenses/bsd-license.php">BSD License</license>
- <notes>- Added support for 13,13xx,18xx,19xx and international syntax phone numbers
-- Change package.xml to version 2</notes>
- </release>
- </changelog>
-</package>
View
308 tests/validate_AU.phpt
@@ -1,308 +0,0 @@
---TEST--
-validate_AU.phpt: Unit tests for 'Validate/AU.php'
---FILE--
-<?php
-// Validate test script
-
-require dirname(__FILE__) . '/validate_functions.inc';
-if (is_file(dirname(__FILE__) . '/../Validate/AU.php')) {
- require_once dirname(__FILE__) . '/../Validate/AU.php';
- $dataDir = dirname(__FILE__) . '/../data';
-} else {
- require_once 'Validate/AU.php';
- $dataDir = null;
-}
-
-echo "Test Validate_AU\n";
-echo "****************\n";
-
-$phones['evilNumbers'] = array('0212345678' => 'KO');
-$phones['nationalPhones'] = array('0883690791' => 'OK');
-$phones['indialPhones'] = array('1302123456' => 'KO',
- '1300123456' => 'OK',
- '131234' => 'OK');
-$phones['premiumSMS'] = array('191234' => 'OK',
- '1912345' => 'OK',
- '19123467' => 'OK');
-
-//International service - prefix 001 or 009 - 1 number
-
-//Digital mobile service - prefix 04 - 100,000 numbers
-$phones['mobilePhones'] = array('0413567532' => 'OK');
-
-
-//Universal personal telecommunications service
-$phones['universalPersonalPhones'] = array('0500456789' => 'OK',
- '0550456789' => 'OK',
- '0590456789' => 'OK');
-
-
-//Data network access
-//prefix 019 80, 019 81, 019 82 or 019 83
-$phones['data'] = array('0198304123' => 'OK',
- '0198204123' => 'OK',
- '0198104123' => 'OK',
- '0198004123' => 'OK',
- '0198404123' => 'KO');
-
-$postalCodes = array( 5251 => 'OK',
- 5000 => 'OK',
- 4662 => 'OK',
- 2470 => 'OK',
- 1000 => 'OK', // (OK if not strong)
- 9999 => 'OK', // (OK if not strong)
- 'abc' => 'KO',
- '800' => 'KO',
- '0800' => 'OK',
- 'a7000' => 'KO');
-
-$postalCodesStrong = array( 5251 => 'OK',
- 5000 => 'OK',
- 4662 => 'OK',
- 2470 => 'OK',
- 1000 => 'KO', // (OK if not strong)
- 9999 => 'KO', // (OK if not strong)
- '800' => 'KO',
- '0800' => 'OK',
- 'abc' => 'KO',
- 'a7000' => 'KO',
-);
-
-$abns = array(
-'28 043 145 470' => 'OK',
-'65 497 794 289' => 'OK',
-'46 527 394 509' => 'OK',
-'99 070 045 359' => 'OK',
-'98 860 905 153' => 'OK',
-'53 106 288 699' => 'OK',
-'51 008 129 511' => 'OK',
-'43 500 713 236' => 'OK',
-'72 342 387 170' => 'OK',
-'21 188 299 895' => 'OK',
-'55 914 901 347' => 'OK',
-'92 638 328 368' => 'OK',
- );//OK
-
-
-$tfns = array(
-'123 456 782' => 'OK',
- );//OK
-
-$acns = array(
-'000 000 019' => 'OK',
-'000 250 000' => 'OK',
-'000 500 005' => 'OK',
-'000 750 005' => 'OK',
-'001 000 004' => 'OK',
-'001 250 004' => 'OK',
-'001 500 009' => 'OK',
-'001 749 999' => 'OK',
-'001 999 999' => 'OK',
-'002 249 998' => 'OK',
-'002 499 998' => 'OK',
-'002 749 993' => 'OK',
-'002 999 993' => 'OK',
-'003 249 992' => 'OK',
-'003 499 992' => 'OK',
-'003 749 988' => 'OK',
-'003 999 988' => 'OK',
-'004 249 987' => 'OK',
-'004 499 987' => 'OK',
-'004 749 982' => 'OK',
-'004 999 982' => 'OK',
-'005 249 981' => 'OK',
-'005 499 981' => 'OK',
-'005 749 986' => 'OK',
-'005 999 977' => 'OK',
-'006 249 976' => 'OK',
-'006 499 976' => 'OK',
-'006 749 980' => 'OK',
-'006 999 980' => 'OK',
-'007 249 989' => 'OK',
-'007 499 989' => 'OK',
-'007 749 975' => 'OK',
-'007 999 975' => 'OK',
-'008 249 974' => 'OK',
-'008 499 974' => 'OK',
-'008 749 979' => 'OK',
-'008 999 979' => 'OK',
-'009 249 969' => 'OK',
-'009 499 969' => 'OK',
-'009 749 964' => 'OK',
-'009 999 964' => 'OK',
-'010 249 966' => 'OK',
-'010 499 966' => 'OK',
-'010 749 961' => 'OK',
-);//OK
-
-$errorFound = false;
-
-foreach ($phones as $data) {
- $errorFound = $errorFound || test_func(array('validate_AU','phoneNumber'), $data);
-}
-
-$errorFound = $errorFound || test_func(array('validate_AU','postalCode'), $postalCodes, array(false, $dataDir));
-$errorFound = $errorFound || test_func(array('validate_AU','postalCode'), $postalCodesStrong, array(true, $dataDir));
-$errorFound = $errorFound || test_func(array('validate_AU','abn'), $abns);
-$errorFound = $errorFound || test_func(array('validate_AU','acn'), $acns);
-$errorFound = $errorFound || test_func(array('validate_AU','tfn'), $tfns);
-
-
-?>
---EXPECT--
-Test Validate_AU
-****************
----------
-Test validate_AU::phoneNumber
- _ Value State Return
- V = validation result is right
- X = validation result is wrong
- V 0212345678 : KO KO
----------
-Test validate_AU::phoneNumber
- _ Value State Return
- V = validation result is right
- X = validation result is wrong
- V 0883690791 : OK OK
----------
-Test validate_AU::phoneNumber
- _ Value State Return
- V = validation result is right
- X = validation result is wrong
- V 1302123456 : KO KO
- V 1300123456 : OK OK
- V 131234 : OK OK
----------
-Test validate_AU::phoneNumber
- _ Value State Return
- V = validation result is right
- X = validation result is wrong
- V 191234 : OK OK
- V 1912345 : OK OK
- V 19123467 : OK OK
----------
-Test validate_AU::phoneNumber
- _ Value State Return
- V = validation result is right
- X = validation result is wrong
- V 0413567532 : OK OK
----------
-Test validate_AU::phoneNumber
- _ Value State Return
- V = validation result is right
- X = validation result is wrong
- V 0500456789 : OK OK
- V 0550456789 : OK OK
- V 0590456789 : OK OK
----------
-Test validate_AU::phoneNumber
- _ Value State Return
- V = validation result is right
- X = validation result is wrong
- V 0198304123 : OK OK
- V 0198204123 : OK OK
- V 0198104123 : OK OK
- V 0198004123 : OK OK
- V 0198404123 : KO KO
----------
-Test validate_AU::postalCode
- _ Value State Return
- V = validation result is right
- X = validation result is wrong
- V 5251 : OK OK
- V 5000 : OK OK
- V 4662 : OK OK
- V 2470 : OK OK
- V 1000 : OK OK
- V 9999 : OK OK
- V abc : KO KO
- V 800 : KO KO
- V 0800 : OK OK
- V a7000 : KO KO
----------
-Test validate_AU::postalCode
- _ Value State Return
- V = validation result is right
- X = validation result is wrong
- V 5251 : OK OK
- V 5000 : OK OK
- V 4662 : OK OK
- V 2470 : OK OK
- V 1000 : KO KO
- V 9999 : KO KO
- V 800 : KO KO
- V 0800 : OK OK
- V abc : KO KO
- V a7000 : KO KO
----------
-Test validate_AU::abn
- _ Value State Return
- V = validation result is right
- X = validation result is wrong
- V 28 043 145 470 : OK OK
- V 65 497 794 289 : OK OK
- V 46 527 394 509 : OK OK
- V 99 070 045 359 : OK OK
- V 98 860 905 153 : OK OK
- V 53 106 288 699 : OK OK
- V 51 008 129 511 : OK OK
- V 43 500 713 236 : OK OK
- V 72 342 387 170 : OK OK
- V 21 188 299 895 : OK OK
- V 55 914 901 347 : OK OK
- V 92 638 328 368 : OK OK
----------
-Test validate_AU::acn
- _ Value State Return
- V = validation result is right
- X = validation result is wrong
- V 000 000 019 : OK OK
- V 000 250 000 : OK OK
- V 000 500 005 : OK OK
- V 000 750 005 : OK OK
- V 001 000 004 : OK OK
- V 001 250 004 : OK OK
- V 001 500 009 : OK OK
- V 001 749 999 : OK OK
- V 001 999 999 : OK OK
- V 002 249 998 : OK OK
- V 002 499 998 : OK OK
- V 002 749 993 : OK OK
- V 002 999 993 : OK OK
- V 003 249 992 : OK OK
- V 003 499 992 : OK OK
- V 003 749 988 : OK OK
- V 003 999 988 : OK OK
- V 004 249 987 : OK OK
- V 004 499 987 : OK OK
- V 004 749 982 : OK OK
- V 004 999 982 : OK OK
- V 005 249 981 : OK OK
- V 005 499 981 : OK OK
- V 005 749 986 : OK OK
- V 005 999 977 : OK OK
- V 006 249 976 : OK OK
- V 006 499 976 : OK OK
- V 006 749 980 : OK OK
- V 006 999 980 : OK OK
- V 007 249 989 : OK OK
- V 007 499 989 : OK OK
- V 007 749 975 : OK OK
- V 007 999 975 : OK OK
- V 008 249 974 : OK OK
- V 008 499 974 : OK OK
- V 008 749 979 : OK OK
- V 008 999 979 : OK OK
- V 009 249 969 : OK OK
- V 009 499 969 : OK OK
- V 009 749 964 : OK OK
- V 009 999 964 : OK OK
- V 010 249 966 : OK OK
- V 010 499 966 : OK OK
- V 010 749 961 : OK OK
----------
-Test validate_AU::tfn
- _ Value State Return
- V = validation result is right
- X = validation result is wrong
- V 123 456 782 : OK OK

0 comments on commit 11b84d2

Please sign in to comment.