Skip to content

A simple PHP script to validate Iranian national codes using the standard algorithm.

License

amintatari64/national-code-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

National Code Validator (PHP)

A simple PHP script to validate Iranian national codes using the standard algorithm. Comes with a web UI demo.

Features

  • Validate national code algorithmically
  • Simple web UI
  • Works locally without a database

Usage

  1. Clone the repository:
    git clone https://github.com/amintatari64/national-code-validator.git
  2. Open public/index.php in your browser.
  3. Enter username and national code to test.
    • Demo username: tapandwin
    • Demo national code: any valid 10-digit number (e.g., 0012345678)

Security & Privacy

  • This is a demo. Do not enter real national codes.
  • No data is stored on the server.

Run Tests

Install PHPUnit and run:

vendor/bin/phpunit tests/functionsTest.php

License

MIT

About

A simple PHP script to validate Iranian national codes using the standard algorithm.

Topics

Resources

License

Stars

Watchers

Forks