Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/olegmarko/phone-validator

Laravel Phone Validation
https://github.com/olegmarko/phone-validator

laravel laravel-package laravel-validation phone-validation

Last synced: 4 days ago
JSON representation

Laravel Phone Validation

Awesome Lists containing this project

README

        

Laravel Phone Validator (most phone number formats)


Total Downloads
Latest Stable Version
License

## Introduction

Phone Validator is a simple validator phone number.

## Installation

To get started with Phone Validator, simply run:

composer require fixik/phone-validator

Next, register the `Fixik\Validator\PhoneValidatorServiceProvider` in your `config/app.php` file:

```php
'providers' => [
// Other service providers...

Fixik\Validator\PhoneValidatorServiceProvider::class,
],
```

## Basic Usage

From your validator use method `phone`

## Add validation message

`resources/lang/en/validation.php`

```php
'phone' => 'The :attribute field contains an invalid phone number'
```

## License

Phone Validator is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)