New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

soved/laravel-phone-number-validation

Validate a phone number
3,073 4
Install
composer require soved/laravel-phone-number-validation
Latest Version:v1.3.1
PHP:^7.0.0
Laravel:5 – 8
License:MIT
Last Updated:Sep 11, 2020
Links: GitHub  ·  Packagist
Maintainer: sander3

Validate a phone number

Scrutinizer Code Quality Latest Stable Version Monthly Downloads License

Using Laravel's powerful validation feature.

Requirements

  • PHP >= 7.1
  • Laravel >= 5.5 or 6.0

Installation

Install the package via the Composer package manager:

$ composer require soved/laravel-phone-number-validation

Usage

You may use the phone number validation as any other validation rule:

<?php

$request->validate([
    'phone_number' => 'required|string|phone_number',
]);

If needed, you may customize the validation error message by adding an entry to the validation language file:

'phone_number' => 'The phone number format is invalid.',

'accepted' => 'The :attribute must be accepted.',

// The rest of the validation error messages...

Security Vulnerabilities

If you discover a security vulnerability within this project, please send an e-mail to Sander de Vos via sander@tutanota.de. All security vulnerabilities will be promptly addressed.

License

This package is open-source software licensed under the MIT license.

Related Packages

claraleigh/naughty-username

Validate that a username is not a naughty one

24,348 0
cohensive/validation

Extra functionality for Laravel 5 Validator.

13,938 14
jedrzej/validator-extended-syntax

Laravel 4/5 package that adds validator negation to Laravel's validation module

11,595 3
shin1x1/laravel-validator-builder

Laravel 4 Validator builder

7,436 2
digitonic/validation

A Laravel custom validation package with some out of the box validators.

2,526 2

Version History

Version Released PHP Laravel License
v1.3.1 ^7.0.0 ~5.5|~6.0|~7.0|~8.0 MIT
v1.3.0 ^7.0.0 ~5.5|^6.0 MIT
v1.1.0 ^7.0.0 ~5.5 MIT
v1.0.0 ^7.0.0 ~5.5 MIT