Skip to content

mohamedmansor/Egyptian-national-ID-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NID Validator

codecov License: MIT

NID validator is a Django project based API that will validate the National ID number.

Features!

  • It will validate Egyption National ID Number.
    • Check length
    • Check NID number combonents is valid.
  • Extract User data from the number
    • Birthdate
    • Gender
    • Governorate

Installation

NID Validator requires Python v3+ and virtualenv to be installed.

After creating a virtual

$ git clone https://github.com/mohamedmansor/plat-course.git
$ cd Egyptian-national-ID-validator
$ virtualenv -p python3 env
$ source env/bin/activate
$ pip install -r requirements.txt

Development

Run the project:

$ cd nid_validator
$ python manage.py makemigrations
$ python manage.py migrate
$ python manage.py runserver

Verify the deployment by navigating to your server address in your preferred browser.

127.0.0.1:8000

Test the API

Open postman or any other API testing software. create a POST request to 127.0.0.1:8000/api/v1/nid/validate with request body

{
    "national_id_number": "<National-id-number>"
}

License

MIT

contributions

To contribute user Django command to create another app then add the validation. create another Django app with added logic of other countries National IDs

About

Egyptian National ID validation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages