A simple PHP script to validate Iranian national codes using the standard algorithm. Comes with a web UI demo.
- Validate national code algorithmically
- Simple web UI
- Works locally without a database
- Clone the repository:
git clone https://github.com/amintatari64/national-code-validator.git
- Open
public/index.phpin your browser. - Enter username and national code to test.
- Demo username:
tapandwin - Demo national code: any valid 10-digit number (e.g.,
0012345678)
- Demo username:
- This is a demo. Do not enter real national codes.
- No data is stored on the server.
Install PHPUnit and run:
vendor/bin/phpunit tests/functionsTest.phpMIT