pyaesoneaung/myanmar-phone-validation-rules

Myanmar Phone Number Validation Rules For Laravel

v1.0.2 2023-03-17 02:18 UTC

This package is auto-updated.

Last update: 2024-10-17 05:37:20 UTC


README

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)