fixik/phone-validator

Laravel phone validation package

v1.0.2 2017-11-15 14:59 UTC

This package is auto-updated.

Last update: 2024-04-06 08:49:24 UTC


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:

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

    Fixik\Validator\PhoneValidatorServiceProvider::class,
],

Basic Usage

From your validator use method phone

Add validation message

resources/lang/en/validation.php

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

License

Phone Validator is open-sourced software licensed under the MIT license