Skip to content

Latest commit

 

History

History
65 lines (50 loc) · 1.1 KB

README.md

File metadata and controls

65 lines (50 loc) · 1.1 KB

Myanmar Phone Number Validation Rules For Laravel

Installation

composer require pyaesoneaung/myanmar-phone-validation-rules

Usage

MyanmarPhone

use PyaeSoneAung\MyanmarPhoneValidationRules\MyanmarPhone;

$request->validate([
    'phone' => ['required', new MyanmarPhone],
]);

MPT

use PyaeSoneAung\MyanmarPhoneValidationRules\Mpt;

$request->validate([
    'phone' => ['required', new Mpt],
]);

Ooredoo

use PyaeSoneAung\MyanmarPhoneValidationRules\Ooredoo;

$request->validate([
    'phone' => ['required', new Ooredoo],
]);

Telenor

use PyaeSoneAung\MyanmarPhoneValidationRules\Telenor;

$request->validate([
    'phone' => ['required', new Telenor],
]);

Mytel

use PyaeSoneAung\MyanmarPhoneValidationRules\Mytel;

$request->validate([
    'phone' => ['required', new Mytel],
]);

MEC

use PyaeSoneAung\MyanmarPhoneValidationRules\Mec;

$request->validate([
    'phone' => ['required', new Mec],
]);

Credits

Ko Htet Wai Yan Soe (myanmar-phone-number-php)