Downloads
Stars
Version
A simple class to validate mobile numbers in Iran.
Via Composer
$ composer require persian-validator/mobile
Instantiate the class
$mobile = Mobile::make('0912000000');
Returns Boolean
$mobile->isValid();
Returns Boolean
$mobile->notValid();
Retruns Boolean
$moile->isIrancell();
Reruns the operator for the number
$mobile->operator();
If it's Hamrah aval, it returns the province for it. like Tehran, Isfahan ...
$mobile->province();
If mobile is valid returns nothing but if it's not valid Exception is thrown!
$mobile->validate();
License This library is released under the MIT license.