Laravel Phone Validator (most phone number formats)
Phone Validator is a simple validator phone number.
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,
],
From your validator use method phone
resources/lang/en/validation.php
'phone' => 'The :attribute field contains an invalid phone number'
Phone Validator is open-sourced software licensed under the MIT license