Python package that consumes a NZBN and returns either True or False depending on whether the NZBN Number is valid or not.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
If you would like to create your own package follow the guide below:
pip install git+https://github.com/danielcerezodev/NZ_Business_Number_Validator.git
from NZ_Business_Number_Validator import is_valid
nzbn_number = "9876543210123"
is_nzbn_number_valid = is_valid(nzbn_number)
if is_nzbn_number_valid:
print(nzbn_number + " is valid")
else:
print(nzbn_number + " is not valid")
The following steps are performed:
- Check the valid amount of digits
- If the NZBN does not contain exactly 13 digits the number is invalid.
- Check the leading digit
- If the first digit of the NZBN is NOT a 9, the number is invalid.
Pull requests are welcome.
This project is licensed under the GNU License - see the LICENSE.md file for details.