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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file nz-bank-validate-1.0.1.tar.gz.

File metadata

  • Download URL: nz-bank-validate-1.0.1.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.10

File hashes

Hashes for nz-bank-validate-1.0.1.tar.gz
Algorithm Hash digest
SHA256 105e124b057f11ff5405b6a9e5b4ed52debc4f376a8f866e74a73afa7e03a6bb
MD5 ee4188db2316cf88e974ce9000829af6
BLAKE2b-256 b474f67f238a35584dbfc47ed915183cfbc6cdee5632ae6ba6b1515974a9a941

See more details on using hashes here.

File details

Details for the file nz_bank_validate-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: nz_bank_validate-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.10

File hashes

Hashes for nz_bank_validate-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5d9c13a4603e8cb5b70259831692aa3bc84daa2004e14d1ebcc7144a3f5e7254
MD5 92692aca67126d7ac2db2e35e65552d8
BLAKE2b-256 755083fc3b748f6b14efaea679e4291e0c82827ca260d62d934c4eaeae423bc6

See more details on using hashes here.

Supported by

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