Skip to content

ThisIsPita/country-codes

 
 

Repository files navigation

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],
]);

About

Validates 2 & 3 character country codes.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%