Skip to main content

Validates account numbers for New Zealand banks

Project description

NZ Bank validator

This package validates account numbers for all New Zealand banks, based on chapter "8. Bank account number validation" in "2020 Resident Withholding Tax (RWT) and Non-Resident Withholding Tax (NRWT) - Software Requirements Specification For the year ending 31 March 2020"

from nz_bank_validate import nz_bank_validate

nz_bank_validate(*'08-6523-1954512-001'.split('-'))

If validate succeeded, the function returns True.

If validate failed, the function raises ValueError('invalid').

Or use option return_false_on_fail to explicitly indicate return False when invalid:

nz_bank_validate(*'08-6523-1954512-001'.split('-'), return_false_on_fail=False)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nz-bank-validate-1.0.1.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

nz_bank_validate-1.0.1-py3-none-any.whl (5.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page