diff --git a/Validate/FI.php b/Validate/FI.php deleted file mode 100644 index a5f3b4f..0000000 --- a/Validate/FI.php +++ /dev/null @@ -1,682 +0,0 @@ - - * @copyright 2006-2010 Jani Mikkonen - * @license http://www.opensource.org/licenses/bsd-license.php New BSD - * @version SVN: $Id$ - * @link http://pear.php.net/package/Validate_FI - */ - -// {{{ class Validate_FI -/** - * Validation class for Finland - * - * This class provides methods to validate: - * - Postal Code - * - Telephone Number - * - Car License Plate Number - * - Motorbike License Plate Number - * - Personal Identity Number (HETU) - * - Unique Identification Number (SATU) - * - Business ID Number (Y-tunnus) - * - Party Identification Number (OVT-tunnus) - * - Value Added Tax Number (ALV-numero) - * - Bank Account Number (tilinumero) - * - Bank Reference Number (viitenumero) - * - Credit Card Number - * - * @category Validate - * @package Validate_FI - * @author Jani Mikkonen - * @copyright 2006-2010 Jani Mikkonen - * @license http://www.opensource.org/licenses/bsd-license.php New BSD - * @version Release: @package_version@ - * @link http://pear.php.net/package/Validate_FI - */ -class Validate_FI -{ - - // {{{ bool Validate_FI::postalCode( string $number [, bool $strong = false] ) - /** - * Validate Finnish postal code. - * - * Five digit postal code, maybe with a leading 'FI-'. - * - * Format: XXXXX or FI-XXXXX - * - * - * - * - * - * @param string $number the postal code to be validated - * @param bool $strong optional; strong checks - * (e.g. against a list of postal codes) - * - * @static - * @access public - * @return bool true if postal code is valid, false otherwise - */ - function postalCode($number, $strong=false) - { - return (bool) preg_match("/^(FI-)?[0-9]{5}$/", $number); - } - // }}} - - // {{{ bool Validate_FI::phoneNumber( string $number ) - /** - * Validate Finnish telephone number. - * - * Simple check: number must be numeric when (, ), -, +, ., ' ' - * chars are removed and 3-20 digit number. - * - * - * - * - * - * @param string $number the telephone number to be validated - * - * @static - * @access public - * @return bool true if telephone number is valid, false otherwise - */ - function phoneNumber($number) - { - $number = str_replace(Array('(', ')', '-', '+', '.', ' '), '', $number); - return (bool) preg_match("/^[0-9]{3,20}$/", $number); - } - // }}} - - // {{{ bool Validate_FI::carLicensePlate( string $number ) - /** - * Validate Finnish car license plate number. - * - * Format: AAA-XXX, CD-XXXX or C-XXXXX. First or only number cannot be zero. - * - * AAA-XXX: AAA is 2-3 letters UPPERCASE A-Z + ÅÄÖ and XXX is 1-3 numbers. - * CD-XXXX: CD- and XXXX is 1-4 numbers (diplomat licence plate) - * C-XXXXX: C- and XXXXX is 1-5 numbers (other tax-free diplomat licence plate) - * - * - * - * - * - * @param string $number the license plate number to be validated - * - * @static - * @access public - * @return bool true if license plate number is valid, false otherwise - * @link http://www.ake.fi/AKE/Rekisterointi/Suomen_rekisterikilvet/ - */ - function carLicensePlate($number) - { - // diplomat licence plate - if (preg_match("/^CD-[1-9]{1}[0-9]{0,3}$/", $number)) { - return true; - } - // other tax-free diplomat licence plate - if (preg_match("/^C-[1-9]{1}[0-9]{0,4}$/", $number)) { - return true; - } - // regular licence plate - if (preg_match("/^[A-ZÅÄÖ]{2,3}-[1-9]{1}[0-9]{0,2}$/", $number)) { - return true; - } - return false; - } - // }}} - - // {{{ bool Validate_FI::bikeLicensePlate( string $number ) - /** - * Validate Finnish motorbike license plate number. - * - * Format: AAAXXX. First or only number cannot be zero. - * - * Where AAA is 2-3 letters UPPERCASE A-Z + ÅÄÖ and XXX is 1-3 numbers. - * Letters and numbers are actually in separate lines. - * - * - * - * - * - * @param string $number the license plate number to be validated - * - * @static - * @access public - * @return bool true if license plate number is valid, false otherwise - * @link http://www.ake.fi/AKE/Rekisterointi/Suomen_rekisterikilvet/ - */ - function bikeLicensePlate($number) - { - $reg = "/^[A-ZÅÄÖ]{2,3}(\n)?[1-9]{1}[0-9]{0,2}$/"; - return (bool) preg_match($reg, $number); - } - // }}} - - // {{{ mixed Validate_FI::pin( string $number [, bool $info = false] ) - /** - * Validate Personal Identity Number (HETU). - * - * The Finnish PIN number (HETU) aka Social Security Number (SSN) - * is a 11 digit number with birthdate as ddmmyycxxxy where c is century, - * xxx is a three digit individual number and the last digit is a - * control number (y). - * - * If xxx is odd it's a male PIN number and if even a female. - * - * Return gender (Male or Female) and date of birth (YYYY-MM-DD) in array if - * PIN is valid, is available by switching $info (2nd parameter) to true. - * - * Example: 010101-123N would be a male and born in 1st of January 1901. - * - * - * - * - * - * @param string $number PIN number to be validated - * @param bool $info optional; Return gender and date of birth on success - * - * @static - * @access public - * @return mixed Returns true or false if $info = false or - * gender (Male or Female) and date of birth (YYYY-MM-DD) - * in array if PIN is valid, false otherwise - * @link http://tarkistusmerkit.teppovuori.fi/tarkmerk.htm#hetu1 - */ - function pin($number, $info = false) - { - $regs = ''; - $pin = strtoupper($number); - static $control = array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "A", "B", "C", "D", "E", "F", "H", "J", "K", "L", - "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y"); - static $century = array('+' => "18", '-' => "19", 'A' => "20"); - $reg = "/^([0-9]{2})([0-9]{2})([0-9]{2})([+-A]{1})([0-9]{3})([0-9A-Z]{1})$/"; - if (preg_match($reg, $pin, $regs)) { - // Validate date of birth. Must be a Gregorian date. - if (checkdate($regs[2], $regs[1], $century[$regs[4]].$regs[3])) { - $test = $regs[1].$regs[2].$regs[3].$regs[5]; - if ($control[intval($test) % 31] == $regs[6]) { - if ($info) { - $gen = ($regs[5] % 2 == 1) ? 'Male' : 'Female'; - $dob = $century[$regs[4]].$regs[3].'-'.$regs[2].'-'.$regs[1]; - return array($gen, $dob); - } else { - return true; - } - } - } - } - return false; - } - // }}} - - // {{{ bool Validate_FI::finuid( string $number ) - /** - * Validate Finnish Unique Identification Number (SATU). - * - * FINUID (SATU) is a 9 digit number. The last digit is a control number. - * - * Example: 10011187H - * - * - * - * - * - * @param string $number FINUID number to be validated - * - * @static - * @access public - * @return bool true if FINUID is valid, false otherwise - * @link http://tarkistusmerkit.teppovuori.fi/tarkmerk.htm#satu - */ - function finuid($number) - { - $regs = ''; - $number = strtoupper($number); - static $control = array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "A", "B", "C", "D", "E", "F", "H", "J", "K", "L", - "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y"); - if (preg_match("/^([0-9]{8})([0-9A-Z]{1})$/", $number, $regs)) { - if ($control[intval($regs[1])%31] == $regs[2]) { - return true; - } - } - return false; - } - // }}} - - // {{{ bool Validate_FI::businessId( string $number ) - /** - * Validate Finnish Business ID (Y-tunnus). - * - * The Finnish Business ID number (Y-tunnus) is a 9 digit number. - * The last digit is a control number (y). - * - * Format: xxxxxxx-y - * - * - * - * - * - * @param string $number Business ID number to be validated - * - * @static - * @access public - * @return bool true if Business ID is valid, false otherwise - * @link http://tarkistusmerkit.teppovuori.fi/tarkmerk.htm#y-tunnus2 - */ - function businessId($number) - { - if (preg_match("/^[0-9]{6,7}-[0-9]{1}$/", $number)) { - list($num, $control) = preg_split('[-]', $number); - // Add leading zeros if number is < 7 - $num = str_pad($num, 7, 0, STR_PAD_LEFT); - $controlSum = 0; - $controlSum += (int)substr($num, 0, 1)*7; - $controlSum += (int)substr($num, 1, 1)*9; - $controlSum += (int)substr($num, 2, 1)*10; - $controlSum += (int)substr($num, 3, 1)*5; - $controlSum += (int)substr($num, 4, 1)*8; - $controlSum += (int)substr($num, 5, 1)*4; - $controlSum += (int)substr($num, 6, 1)*2; - $controlSum = $controlSum%11; - if ($controlSum == 0) { - return ($controlSum == $control) ? true : false; - } elseif ($controlSum >= 2 && $controlSum <= 10 ) { - return ((11 - $controlSum) == $control) ? true : false; - } - } - return false; - } - // }}} - - // {{{ bool Validate_FI::partyId( int $number ) - /** - * Validate Finnish Party Identification number (OVT-tunnus). - * - * The Finnish Party Identification number (OVT-tunnus) is a 12-17 - * digit number and it is generated from Business ID. - * - * Example: 0037AAAAAAAABBBBB, 0037 indicates Finland, AAAAAAAA is the - * Business ID and BBBBB is optional organization number. - * - * - * - * - * - * @param int $number Party Identification number to be validated - * - * @static - * @access public - * @return bool true if number is valid, false otherwise - * @see Validate_FI::businessId() - * @link http://tarkistusmerkit.teppovuori.fi/tarkmerk.htm#alv-numero - */ - function partyId($number) - { - if (preg_match("/^[0-9]{12,17}$/", $number)) { - $countryCode = substr($number, 0, 4); - $controlNum = substr($number, 11, 1); - $businessNum = substr($number, 4, 7); - $businessId = $businessNum.'-'.$controlNum; - if ($countryCode == '0037' && Validate_FI::businessId($businessId)) { - return true; - } - } - return false; - } - // }}} - - // {{{ bool Validate_FI::vatNumber( string $number ) - /** - * Validate Finnish Value Added Tax number (ALV-numero). - * - * The Finnish VAT number (ALV-numero) is maximum - * of 14 digits and is generated from Business ID. - * - * Format: FIXXXXXXXX - * - * - * - * - * - * @param string $number VAT number to be validated - * - * @static - * @access public - * @return bool true if VAT number is valid, false otherwise - * @see Validate_FI::businessId() - * @link http://tarkistusmerkit.teppovuori.fi/tarkmerk.htm#alv-numero - */ - function vatNumber($number) - { - $countryCode = substr($number, 0, 2); - $controlNum = substr($number, -1, 1); - $businessNum = substr($number, 2, -1); - $businessId = $businessNum.'-'.$controlNum; - if ($countryCode == 'FI' && Validate_FI::businessId($businessId)) { - return true; - } - return false; - } - // }}} - - // {{{ bool Validate_FI::bankAccount( string $number ) - /** - * Validate Finnish bank account number. - * - * This method checks the bank account number according to - * Finnish Bank Association. - * - * Format: XXXXXX-XXXXXXXX, 6 digits, - and 2-8 digits. - * - * - * - * - * - * @param string $number Finnish bank account number to be validated - * - * @static - * @access public - * @return bool true if bank account is valid, false otherwise - * @link http://tarkistusmerkit.teppovuori.fi/tarkmerk.htm#pankkitili - * @link http://www.pankkiyhdistys.fi/sisalto/upload/pdf/tilinrorakenne.pdf - */ - function bankAccount($number) - { - if (preg_match("/^[0-9]{6}-[0-9]{2,8}$/", $number)) { - // Bank groups are identified by the first digit - $bankType = substr($number, 0, 1); - // Group 1: First digit is 1, 2, 3, 6 or 8 - $bankGroup1 = array('1', '2', '3', '6', '8'); - // Group 2: First digit is 4 or 5 - $bankGroup2 = array('4', '5'); - // split account number - $regs = ''; - preg_match("/([0-9]{6})-([0-9]{2,8})/", $number, $regs); - if (in_array($bankType, $bankGroup1)) { - // Group 1: 999999-99999 -> 999999-00099999 - $number = $regs[1] . str_pad($regs[2], 8, 0, STR_PAD_LEFT); - // Group 2: 999999-99999 -> 999999-90009999 - } else if (in_array($bankType, $bankGroup2)) { - $number = $regs[1] . substr($regs[2], 0, 1) . - str_pad(substr($regs[2], 1, 7), 7, 0, STR_PAD_LEFT); - } - // Now when we have a 14 digit bank account number, we can validate it. - return Validate_FI::_mod10($number); - } - return false; - } - // }}} - - // {{{ bool Validate_FI::refNum( string $number ) - /** - * Validate Finnish bank reference number. - * - * This method checks the bank reference number according to - * Finnish Bank Association. - * - * - * - * - * - * @param string $number Finnish bank reference number to be validated - * (spaces and dashes tolerated) - * - * @static - * @access public - * @return bool true if reference number is valid, false otherwise - * @link http://tarkistusmerkit.teppovuori.fi/tarkmerk.htm#viitenumero - */ - function refNum($number) - { - // Remove non-numeric characters from $refnum. Only 4-20 digit number. - $refnum = preg_replace('/[^0-9]+/', '', $number); - // The last digit is a control number. - $controlNum = substr($refnum, -1, 1); - // Subtract control number from the $refnum. - $refNumCheck = substr($refnum, 0, strlen($refnum)-1); - if (preg_match("/^[0-9]{3,19}$/", $refNumCheck)) { - // remove leading zeros - $refNumCheck = ltrim($refNumCheck, 0); - $mul = 7; - $refSum = 0; - for ($refLength = strlen($refNumCheck); $refLength > 0; $refLength--) { - $refSum += substr($refNumCheck, $refLength - 1, 1) * $mul; - switch ($mul) { - case 7: - $mul = 3; - break; - case 3: - $mul = 1; - break; - case 1: - $mul = 7; - break; - } - } - $refSum = substr(10 - ($refSum % 10), -1); - if ($refSum == $controlNum) { - return true; - } - } - return false; - } - // }}} - - // {{{ bool Validate_FI::creditCard( string $number ) - /** - * Validate credit card number. - * - * This method checks the credit card number according to Luhn algorithm. - * This method doesn't guarantee that the card is legitimate. - * - * - * - * - * - * @param string $number credit card number to be validated - * (spaces and dashes tolerated) - * - * @static - * @access public - * @return bool true if credit card number is valid, false otherwise - */ - function creditCard($number) - { - // Remove non-numeric characters from $number - $number = preg_replace('/[^0-9]+/', '', $number); - // Validate number - return Validate_FI::_mod10($number); - } - // }}} - - // {{{ bool Validate_FI::_mod10( string $number ) - /** - * Validate number according to Luhn algorithm (mod 10). - * - * This method checks given number according Luhn algorithm. - * - * @param string $number to be validated - * - * @static - * @access private - * @return bool true if number is valid, false otherwise - * @link http://en.wikipedia.org/wiki/Luhn_algorithm - */ - function _mod10($number) - { - // Double every second digit started at the right - $doubledNumber = ''; - $odd = false; - for ($i = strlen($number)-1; $i >=0; $i--) { - $doubledNumber .= ($odd) ? $number[$i]*2 : $number[$i]; - $odd = !$odd; - } - // Add up each 'single' digit - $sum = 0; - for ($i = 0; $i < strlen($doubledNumber); $i++) { - $sum += (int)$doubledNumber[$i]; - } - // A valid number doesn't have a remainder after mod10 or equal to 0 - return (($sum % 10 == 0) && ($sum != 0)) ? true : false; - } - // }}} -} -// }}} - -?> diff --git a/package_FI.xml b/package_FI.xml deleted file mode 100644 index fec75c5..0000000 --- a/package_FI.xml +++ /dev/null @@ -1,156 +0,0 @@ - - - Validate_FI - pear.php.net - Validation class for Finland - Package containes locale validation for Finland such as: - * Postal Code - * Telephone Number - * Car License Plate Number - * Motorbike License Plate Number - * Personal Identity Number (HETU) - * Unique Identification Number (SATU) - * Business ID Number (Y-tunnus) - * Party Identification Number (OVT-tunnus) - * Value Added Tax Number (ALV-numero) - * Bank Account Number (tilinumero) - * Bank Reference Number (viitenumero) - * Credit Card Number - - Jani Mikkonen - janisto - jani@mikkonen.info - yes - - 2010-08-21 - - - 1.0.0 - 1.0.0 - - - stable - stable - - New BSD - * Package has been stable for a long time and now it's compatible with PHP 5.3. -* Fix Bug #17776: Uses deprecated functions ereg() and ereg_replace() -* Fix Bug #17775: Uses deprecated function split() -* Fix Bug #17756: Avoiding ereg -* Fix Bug #11531: phpcs/codesniffer found 91 errors and 14 warnings in FI.php -* tests should run ok when run in SVN directory - - - - - - - - - - - - - - - - - - - - - - - - 4.0.1 - - - 1.4.0 - - - - - - - - 1.0.0 - 1.0.0 - - - stable - stable - - 2010-08-21 - New BSD - * Package has been stable for a long time and now it's compatible with PHP 5.3. -* Fix Bug #17776: Uses deprecated functions ereg() and ereg_replace() -* Fix Bug #17775: Uses deprecated function split() -* Fix Bug #17756: Avoiding ereg -* Fix Bug #11531: phpcs/codesniffer found 91 errors and 14 warnings in FI.php -* tests should run ok when run in SVN directory - - - - 0.4.0 - 0.4.0 - - - beta - beta - - 2007-07-05 - New BSD - - carLicensePlate(): Added new chars and first or only number cannot be zero. -- bikeLicensePlate(): Added new chars and first or only number cannot be zero. -- Added new unit tests. Thanks to Markku Uttula. - - - - 0.3.0 - 0.3.0 - - - beta - beta - - 2007-06-01 - New BSD - - Minor changes in documentation + copyright -- Check Code fixes (Variable 'regs' is used before it was assigned.). -- Move to beta - - - - 0.2.0 - 0.2.0 - - - alpha - alpha - - 2006-11-08 - New BSD - - BC break: Renamed carReg() to carLicensePlate() -- BC break: Renamed bikeReg() to bikeLicensePlate() -- BC break: pin() retuns array containing gender and date of birth if optional param is true -- Fixed some typos and rewrote parts of the code -- Added unit tests for all public methods -- Proper API documentation -- Change package.xml to version 2 -- Removed str_pad extension requirement (typo) - - - - 0.1.0 - 0.1.0 - - - alpha - alpha - - 2006-10-26 - New BSD - - Initial release - - - diff --git a/tests/validate_FI_bankAccount.phpt b/tests/validate_FI_bankAccount.phpt deleted file mode 100644 index f069c0d..0000000 --- a/tests/validate_FI_bankAccount.phpt +++ /dev/null @@ -1,49 +0,0 @@ ---TEST-- -validate_FI_bankAccount.phpt: Unit tests for bankAccount method 'Validate/FI.php' ---FILE-- - ---EXPECT-- -Test Validate_FI -**************** - -Test bankAccount -159030-776: YES -12345-1: NO -12345-12345: NO -123456-1: NO -123456-123456789: NO -159030-6776: NO -759030-776: NO -0: NO --1: NO -valid: NO diff --git a/tests/validate_FI_bikeLicensePlate.phpt b/tests/validate_FI_bikeLicensePlate.phpt deleted file mode 100644 index a9664bd..0000000 --- a/tests/validate_FI_bikeLicensePlate.phpt +++ /dev/null @@ -1,63 +0,0 @@ ---TEST-- -validate_FI_bikeLicensePlate.phpt: Unit tests for bikeLicensePlate method 'Validate/FI.php' ---FILE-- - ---EXPECT-- -Test Validate_FI -**************** - -Test bikeLicensePlate -AB123: YES -ABC123: YES -AB1: YES -ABC12: YES -AB1234: NO -A123: NO -123123: NO -1212: NO -abc123: NO -0: NO --1: NO -valid: NO -ÅÖÄ123: YES -ÖÄ12: YES -ABC0: NO -ABC01: NO -ABC012: NO diff --git a/tests/validate_FI_businessId.phpt b/tests/validate_FI_businessId.phpt deleted file mode 100644 index efcc7a4..0000000 --- a/tests/validate_FI_businessId.phpt +++ /dev/null @@ -1,47 +0,0 @@ ---TEST-- -validate_FI_businessId.phpt: Unit tests for businessId method 'Validate/FI.php' ---FILE-- - ---EXPECT-- -Test Validate_FI -**************** - -Test businessId -1572860-0: YES -0737546-2: YES -0737546-1: NO -0737546-11: NO -0737545-2: NO -57286XX-0: NO -0: NO --1: NO -valid: NO diff --git a/tests/validate_FI_carLicensePlate.phpt b/tests/validate_FI_carLicensePlate.phpt deleted file mode 100644 index 17a4cee..0000000 --- a/tests/validate_FI_carLicensePlate.phpt +++ /dev/null @@ -1,87 +0,0 @@ ---TEST-- -validate_FI_carLicensePlate.phpt: Unit tests for carLicensePlate method 'Validate/FI.php' ---FILE-- - ---EXPECT-- -Test Validate_FI -**************** - -Test carLicensePlate -AB-123: YES -ABC-123: YES -AB-1: YES -ABC-12: YES -AB-1234: NO -A-123: NO -123-123: NO -12-12: NO -abc-123: NO -CD-1234: YES -C-12345: YES -CD-12: YES -C-12: YES -C-1: YES -D-123: NO -C-123456: NO -CD-12345: NO -cd-1234: NO -c-12345: NO -0: NO --1: NO -valid: NO -ÅÖÄ-123: YES -ÖÄ-12: YES -ABC-0: NO -ABC-01: NO -ABC-012: NO -CD-0234: NO -C-02345: NO diff --git a/tests/validate_FI_creditCard.phpt b/tests/validate_FI_creditCard.phpt deleted file mode 100644 index b4de535..0000000 --- a/tests/validate_FI_creditCard.phpt +++ /dev/null @@ -1,54 +0,0 @@ ---TEST-- -validate_FI_creditCard.phpt: Unit tests for creditCard method 'Validate/FI.php' ---FILE-- - ---EXPECT-- -Test Validate_FI -**************** - -Test creditCard -5427 0073 1297 6425: YES -5427007312976425: YES -4929 9474 1842 2442: YES -4929947418422442: YES -346 2488 5493 9558: YES -346248854939558: YES -30 2942 7659 2881: YES -30294276592881: YES -6762195515061814: NO -0x1A6A195515061813: NO -0: NO --1: NO -valid: NO diff --git a/tests/validate_FI_finuid.phpt b/tests/validate_FI_finuid.phpt deleted file mode 100644 index 9df8dfa..0000000 --- a/tests/validate_FI_finuid.phpt +++ /dev/null @@ -1,41 +0,0 @@ ---TEST-- -validate_FI_finuid.phpt: Unit tests for finuid method 'Validate/FI.php' ---FILE-- - ---EXPECT-- -Test Validate_FI -**************** - -Test finuid -10011187H: YES -10011188H: NO -100X1187H: NO -0: NO --1: NO -valid: NO diff --git a/tests/validate_FI_partyId.phpt b/tests/validate_FI_partyId.phpt deleted file mode 100644 index dd71c46..0000000 --- a/tests/validate_FI_partyId.phpt +++ /dev/null @@ -1,47 +0,0 @@ ---TEST-- -validate_FI_partyId.phpt: Unit tests for partyId method 'Validate/FI.php' ---FILE-- - ---EXPECT-- -Test Validate_FI -**************** - -Test partyId -003715728600: YES -003707375462: YES -003707375464: NO -003607375462: NO -003707375452: NO -003757286XX0: NO -0: NO --1: NO -valid: NO diff --git a/tests/validate_FI_phoneNumber.phpt b/tests/validate_FI_phoneNumber.phpt deleted file mode 100644 index 060d9fa..0000000 --- a/tests/validate_FI_phoneNumber.phpt +++ /dev/null @@ -1,55 +0,0 @@ ---TEST-- -validate_FI_phoneNumber.phpt: Unit tests for phoneNumber method 'Validate/FI.php' ---FILE-- - ---EXPECT-- -Test Validate_FI -**************** - -Test phoneNumber -+358 50 1234567: YES -+358 9 1234 567: YES -00358 9 1234 567: YES -050 1234567: YES -050 1234 567: YES -040-1234567: YES -(09) 1234567: YES -(09) 1234 567: YES -+358 50 123456789123456789: NO -12: NO -0: NO --1: NO -valid: NO diff --git a/tests/validate_FI_pin.phpt b/tests/validate_FI_pin.phpt deleted file mode 100644 index 6ae49b6..0000000 --- a/tests/validate_FI_pin.phpt +++ /dev/null @@ -1,73 +0,0 @@ ---TEST-- -validate_FI_pin.phpt: Unit tests for pin method 'Validate/FI.php' ---FILE-- - ---EXPECT-- -Test Validate_FI -**************** - -Test pin -010101-123N: YES -010101-123J: NO -310201-123U: NO -ABC123: NO -123456789: NO -abcdef-123N: NO -0: NO --1: NO -valid: NO - -Test pin with optional param -010101-123N: YES -Array -( - [0] => Male - [1] => 1901-01-01 -) -010101-123J: NO -310201-123U: NO -ABC123: NO -123456789: NO -abcdef-123N: NO -0: NO --1: NO -valid: NO diff --git a/tests/validate_FI_postalCode.phpt b/tests/validate_FI_postalCode.phpt deleted file mode 100644 index 33b45fc..0000000 --- a/tests/validate_FI_postalCode.phpt +++ /dev/null @@ -1,69 +0,0 @@ ---TEST-- -validate_FI_postalCode.phpt: Unit tests for postalCode method 'Validate/FI.php' ---FILE-- - ---EXPECT-- -Test Validate_FI -**************** - -Test postalCode -00100: YES -0010: NO -001000: NO -99999: YES -99X99: NO -fin-12345: NO -fin-1234: NO -FIN-12345: NO -FIN-1234: NO -fi-12345: NO -fi-1234: NO -FI-12345: YES -FI-1234: NO -FI-00100: YES -FI-123456: NO -FI00100: NO --12345: NO -0: NO --1: NO -valid: NO diff --git a/tests/validate_FI_refNum.phpt b/tests/validate_FI_refNum.phpt deleted file mode 100644 index 8d0ca00..0000000 --- a/tests/validate_FI_refNum.phpt +++ /dev/null @@ -1,49 +0,0 @@ ---TEST-- -validate_FI_refNum.phpt: Unit tests for refNum method 'Validate/FI.php' ---FILE-- - ---EXPECT-- -Test Validate_FI -**************** - -Test refNum -61 74354: YES -6174354: YES -123: NO -1234512345123451234512345: NO -12345 54321 123: YES -987 78934 83947: NO -345948365887635: NO -0: NO --1: NO -valid: NO diff --git a/tests/validate_FI_vatNumber.phpt b/tests/validate_FI_vatNumber.phpt deleted file mode 100644 index 408caf2..0000000 --- a/tests/validate_FI_vatNumber.phpt +++ /dev/null @@ -1,47 +0,0 @@ ---TEST-- -validate_FI_vatNumber.phpt: Unit tests for vatNumber method 'Validate/FI.php' ---FILE-- - ---EXPECT-- -Test Validate_FI -**************** - -Test vatNumber -FI15728600: YES -FI07375462: YES -IF15728600: NO -FI15728602: NO -003715728600: NO -FI57286XX0: NO -0: NO --1: NO -valid: NO