semicolonza / za-id-validator
This package is abandoned and no longer maintained.
The author suggests using the za-id-parser package instead.
Package to parse and validate South African ID Numbers
v0.0.2
2020-04-23 09:40 UTC
Requires (Dev)
- phpunit/phpunit: ^7.4
This package is auto-updated.
Last update: 2021-08-19 13:57:37 UTC
README
Package to parse and validate South African ID Numbers.
Installing
$ composer require talifhani/za-id-parser -vvv
Usage
use Talifhani\ZaIdParser\IDNumberParser; $idNumberData = (new IDNumberParser($idNum))->parse(); echo "ID Number: ".$idNumberData->getIdNumber()."<br />"; echo "Birthdate: ".$idNumberData->getBirthdate()."<br />"; echo "Age: ".$idNumberData->getAge()."<br />"; echo "Citizenship: ".$idNumberData->getCitizenship()."<br />"; echo "Gender: ".$idNumberData->getGender()."<br />"; echo "Is Valid ID: ".($idNumberData->isValid() ? 'Yes' : 'No'); print_r($idNumberData->toArray()); /* ( [birthdate] => 1988-09-15 [age] => 30 [gender] => Female [citizenship] => South African [valid] => 1 ) */
Contributing
You can contribute in one of three ways:
- File bug reports using the issue tracker.
- Answer questions or fix bugs on the issue tracker.
- Contribute new features or update the wiki.
The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.
License
MIT