Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pyaesoneaungrgn/myanmar-phone-validation-rules

Myanmar Phone Number Validation Rules For Laravel
https://github.com/pyaesoneaungrgn/myanmar-phone-validation-rules

laravel-validation-rules myanmar-phone-number

Last synced: 2 months ago
JSON representation

Myanmar Phone Number Validation Rules For Laravel

Awesome Lists containing this project

README

        

# Myanmar Phone Number Validation Rules For Laravel

## Installation
```bash
composer require pyaesoneaung/myanmar-phone-validation-rules
```

## Usage

### MyanmarPhone
```php
use PyaeSoneAung\MyanmarPhoneValidationRules\MyanmarPhone;

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

### MPT
```php
use PyaeSoneAung\MyanmarPhoneValidationRules\Mpt;

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

### Ooredoo
```php
use PyaeSoneAung\MyanmarPhoneValidationRules\Ooredoo;

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

### Telenor
```php
use PyaeSoneAung\MyanmarPhoneValidationRules\Telenor;

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

### Mytel
```php
use PyaeSoneAung\MyanmarPhoneValidationRules\Mytel;

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

### MEC
```php
use PyaeSoneAung\MyanmarPhoneValidationRules\Mec;

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

## Credits
[Ko Htet Wai Yan Soe (myanmar-phone-number-php)](https://github.com/johnreginald/myanmar-phone-number-php)