laravel-validation-rules/country-codes

Validate country codes.
530,518 32
Install
composer require laravel-validation-rules/country-codes
Latest Version:4.2.0
PHP:^7.3|^8.0
Laravel:5 – 10
License:Apache-2.0
Last Updated:Jul 26, 2024
Links: GitHub  ·  Packagist
Maintainer: clarkeash

Country Codes

Validates 2 & 3 character country codes.

Installation

composer require laravel-validation-rules/country-codes

Usage

Validate a 2 character country code.

use LVR\CountryCode\Two;

$request->validate([
    'country' => ['required', new Two],
]);

Validate a 3 character country code.

use LVR\CountryCode\Three;

$request->validate([
    'country' => ['required', new Three],
]);

Related Packages

claraleigh/naughty-username

Validate that a username is not a naughty one

24,243 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,580 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
4.2.0 ^7.3|^8.0 ^5.5|^6.0|^7.0|^8.0|^9.0|^10.0 Apache-2.0
4.1.0 ^7.3|^8.0 ^5.5|^6.0|^7.0|^8.0|^9.0 Apache-2.0
4.0.0 ^7.3|^8.0 ^5.5|^6.0|^7.0|^8.0|^9.0 Apache-2.0
v3.0.0 ^7.3|^8.0 ^5.5|^6.0|^7.0|^8.0 Apache-2.0
2.2.0 ^5.5|^6.0|^7.0|^8.0 Apache-2.0