persian-validator / national-code
Validates national codes in Iran
1.0.0
2018-07-01 13:45 UTC
This package is not auto-updated.
Last update: 2024-09-29 10:25:46 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.