persian-validator / national-code
Validates national codes in Iran
Installs: 136
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
pkg:composer/persian-validator/national-code
This package is not auto-updated.
Last update: 2025-12-21 16:18:12 UTC
README
A simple class to validate national codes in Iran.
Install
Via Composer
$ composer require persian-validator/national-code
Usage
Instantiate the class
$nationalCode = NationalCode::make('123456789');
Returns Boolean
$nationalCode->isValid();
Returns Boolean
$nationalCode->notValid();
If national code is valid returns nothing but if it's not valid Exception is thrown!
$nationalCode->validate();
License This library is released under the MIT license.