NZ Bank Account Validation for PHP
A PHP library that validates New Zealand bank account numbers (BECS numbers) as matching the format, within valid ranges, and contain a valid checksum.
- PHP 5.4+
composer require glutnix/nz-bank-account-validation
Alternatively, download the contents of this repository into your project and require the class manually, like a caveman.
$account = new \Glutnix\BankAccountValidator("01-902-0068389-00"); echo $account->isValid() ? "Valid" : "Not Valid";
There are other usable methods on BankAccountValidator, so check the code: check the spec for how they are used. Maybe contribute some documentation?
Open an issue to check if your contribution is desirable, or just go right ahead and send a Pull Request against the master branch.
- Code must be PSR-2 compliant; PHP Code Sniffer and editorconfig settings are included for your convenience.
- Passing PHPSpec tests required to cover any new code.
- Full-featured Documentation
- Optionally use PaymentsNZ Bank Branch Register to validate against currently open banks and branches.