laravel-validation-rules/country-codes

Validate country codes.
509,301 32
Install
composer require laravel-validation-rules/country-codes
Latest Version:4.2.0
PHP:^7.3|^8.0
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

prettus/laravel-validation

Laravel Validation Service

11,710,949 406
pixelpeter/laravel5-isocodes-validation

Laravel 5 wrapper for the IsoCodes Validation library from ronanguilloux

87,802 19
skysplit/laravel5-intl-translation

Laravel 5 package for better translation syntax using php-intl extension

106,752 10
propaganistas/laravel-phone

Adds phone number functionality to Laravel based on Google's libphonenumber API.

42,184,719 3,024