Validate country codes.

2.2.0 2020-09-16 17:52 UTC

This package is auto-updated.

Last update: 2020-10-16 17:56:44 UTC


README

Validates 2 & 3 character country codes.

68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6c61726176656c2d76616c69646174696f6e2d72756c65732f636f756e7472792d636f6465732e7376673f7374796c653d666c61742d737175617265 68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6c61726176656c2d76616c69646174696f6e2d72756c65732f636f756e7472792d636f6465732e7376673f7374796c653d666c61742d737175617265 68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6c61726176656c2d76616c69646174696f6e2d72756c65732f636f756e7472792d636f6465732e7376673f7374796c653d666c61742d737175617265 68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6c61726176656c2d76616c69646174696f6e2d72756c65732f636f756e7472792d636f6465732e7376673f7374796c653d666c61742d737175617265

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