Skip to main content

A package to validate Zimbabwean mobile numbers for Telecel,Netone,Econet or any other number from major MNOs in Zim,passports,national IDs,drivers licenses etc

Project description

https://img.shields.io/pypi/v/country_list.svg https://img.shields.io/badge/code%20style-black-000000.svg

Features

  • This is package to assist developers to validate zimbabwean driver’s license numbers, vehicle registration numbers, mobile numbers for Telecel,Econet,Netone and any other valid zim number registered under the major MNOs,Zim passports, national IDs among other things. Visit the project homepage for further information on how to use the package.

Installation

To can install the zim_validate package open shell or terminal and run:

pip install zim_validate

Usage

Validate National ID:

If dashes are mandatory the ID will be in the format 12-3456789-X-01 If the dashes are not mandatory the format will be 123456789X01

Note parameter dashes: (Optional) If you want to make dashes compulsory on the input string

from zim_validate import national_id
print(national_id("12-3456789-X-01",dashes=True))

Validate Passport:

All Zimbabwean passports are in the format AB123456

from zim_validate import passport
print(passport("AB123456"))

Validate ID or passport:

All Zimbabwean passports are in the format AB123456 If dashes are mandatory the ID will be in the format 12-3456789-X-01 If the dashes are not mandatory the format will be 123456789X01

from zim_validate import id_or_passport
print(id_or_passport("12-3456789-X-01",dashes=True))

Validate Telecel Numbers:

This can be used to check if the given mobile number is a valid Telecel number. Pass the optional parameter prefix you want to make the prefix 263 mandatory

from zim_validate import telecel_number
print(telecel_number("263735111111",prefix=True))

Validate Econet Numbers:

This can be used to check if the given mobile number is a valid Econet number. Pass the optional parameter prefix you want to make the prefix 263 mandatory

from zim_validate import econet_number
print(econet_number("263775111111",prefix=True))

Validate Netone Numbers:

This can be used to check if the given mobile number is a valid Netone number. Pass the optional parameter prefix you want to make the prefix 263 mandatory

from zim_validate import netone_number
print(netone_number("263715111111",prefix=True))

Validate Any Number from Telecel,Econet,Netone among other MNOs:

This can be used to check if the given mobile number is a valid Telecel,Econet or Netone number. Pass the optional parameter prefix you want to make the prefix 263 mandatory

from zim_validate import mobile_number
print(mobile_number("263782123345",prefix=True))

Validate Drivers License:

All Zimbabwean drivers licenses are in the format 111111AB Pass the optional parameter space if you want a space between the first 6 numbers and the last two letters

from zim_validate import license_number
print(license_number("111111AB",space=False))

Validate Zim Vehicle Registration Number:

All Zimbabwean number plates are in the format ABC1234 Pass the optional parameter space if you want a space between the first three letters and the preceding letters numbers

from zim_validate import number_plate
print(number_plate("ABF4495",space=False))

Bonus :Password:

Validate password to contain at at least one upper case,at least one lower case,at least one digit, at least one special character, minimum length 8

from zim_validate import password
print(password("Password@1"))

License

The project is licensed under the MIT license.

Change Log

0.0.1(04-February-2022)

  • First Release of the Zim Validate Library that will assist developers validating Zim National Ids, Mobile numbers from all MNOs,Zim passports,Drivers licenses among other things

0.0.2(05-February-2022)

-Fixing the documentation

0.0.1(05-February-2022)

-Fixing the bug on the validation of mobile numbers

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

zim_validate-0.0.4.tar.gz (4.8 kB view details)

Uploaded Source

File details

Details for the file zim_validate-0.0.4.tar.gz.

File metadata

  • Download URL: zim_validate-0.0.4.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for zim_validate-0.0.4.tar.gz
Algorithm Hash digest
SHA256 c3b2bce3cfc8a0e2eb8af1dcfa2b7a4d1f1bc84ef8952927e895a19a56df03df
MD5 31c7abd3ef71f3cb49f3beb2cba4d298
BLAKE2b-256 47b9eb86e0388e8ffc6fbe1d1341adbc7fb70a606280107c1e7f4bdcdbdb6ad4

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