laravel-validation-rules/country-codes

Validate country codes.
505,736 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,554,232 406
pixelpeter/laravel5-isocodes-validation

Laravel 5 wrapper for the IsoCodes Validation library from ronanguilloux

87,789 19
skysplit/laravel5-intl-translation

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

106,696 10
propaganistas/laravel-phone

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

40,968,576 3,020