https://github.com/farhad-here/id_validator
Iranian National ID Validator. This was one of my data analysis project for the course i had.
https://github.com/farhad-here/id_validator
data-analysis identity idverification object-oriented-programming oop oops-in-python python streamlit
Last synced: about 1 month ago
JSON representation
Iranian National ID Validator. This was one of my data analysis project for the course i had.
- Host: GitHub
- URL: https://github.com/farhad-here/id_validator
- Owner: farhad-here
- License: mit
- Created: 2025-04-29T15:17:52.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-30T22:47:21.000Z (about 1 year ago)
- Last Synced: 2025-05-07T18:13:27.078Z (about 1 year ago)
- Topics: data-analysis, identity, idverification, object-oriented-programming, oop, oops-in-python, python, streamlit
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🪪This is my Id validator web application
# 🆔 Iranian National ID Validator
A simple Python project to validate Iranian National Identification Numbers based on the official checksum algorithm. This project is implemented using **Object-Oriented Programming (OOP)** principles.
---
## ✅ Features
- Checks if the entered National ID is exactly 10 digits
- Ensures the input contains only numeric characters
- Rejects invalid IDs with all identical digits (e.g., `1111111111`)
- Implements the official **checksum algorithm** used for validation
- Clean and readable structure using **Python classes**
---
## 📦 Requirements
- Python 3.x
All libraries used are from Python’s standard library, so no additional packages are required.
---
## 🔢 Validation Algorithm
1. The ID must be a **10-digit number**.
2. All digits **cannot be the same**.
3. Compute the **checksum** as follows:
checksum = (10×digit1 + 9×digit2 + ... + 2×digit9) % 11
4. Then:
- If `checksum < 2`, it must be equal to the **10th digit**.
- If `checksum >= 2`, then `10th digit = 11 - checksum`.
---
## 🎨UI

## 👨💻Used Technologies
- streamlit
- python