LaravelPackages.net
Acme Inc.
Toggle sidebar
persian-validator/mobile

Validates mobile numbers in Iran

161
3
1.0.0
About persian-validator/mobile

persian-validator/mobile is a Laravel package for validates mobile numbers in iran. It currently has 3 GitHub stars and 161 downloads on Packagist (latest version 1.0.0). Install it with composer require persian-validator/mobile. Discover more Laravel packages by persian-validator or browse all Laravel packages to compare alternatives.

Last updated

Persian Mobile Validator

A simple class to validate mobile numbers in Iran.

Install

Via Composer

$ composer require persian-validator/mobile

Usage

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.

Star History Chart