NID validator is a Django project based API that will validate the National ID number.
- It will validate Egyption National ID Number.
- Check length
- Check NID number combonents is valid.
- Extract User data from the number
- Birthdate
- Gender
- Governorate
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
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
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>"
}
MIT
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