Edit report at https://pear.php.net/bugs/bug.php?id=20237&edit=1
ID: 20237
Updated by: ken@linux.ie
Reported By: 4od@moonraking.com
Summary: PPS number not validaing correctly for new 9 char
numbers
Status: Open
Type: Bug
Package: Validate_IE
Operating System: Linux
Package Version: 1.1.0a1
PHP Version: 5.3.28
-Assigned To:
+Assigned To: kguest
Roadmap Versions:
New Comment:
-Assigned To:
+Assigned To: kguest
Previous Comments:
------------------------------------------------------------------------
[2014-04-07 18:15:03] moonraking
Description:
------------
The checkmod32 function needs to be updated to take into account a 9
char pps number
Test script:
---------------
var_dump( Validate_IE::ppsn('1297188CA') );
Expected result:
----------------
bool(true)
Actual result:
--------------
bool(false)
its failing in checkMod32().
For my own use I have reimplemented (successfully) using algorithm
linked from the wikipedia page on Irish PPS's
http://pmhsilva.com/2013/02/12/validate-irish-ppsn-with-javascript-jquery/
I feel checkMod32 should be changed to getCheckCode($number_part,
$check_code_part) and return the checksum. That way getCheckCode can be
used in validation code to inform the user what the checkcode might be,
maybe they entered up an I instead of an L. Yes, they could have
entered a number wrong, but every little helps....
shane
------------------------------------------------------------------------