PHPackages                             eplayment/country-codes - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. eplayment/country-codes

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

eplayment/country-codes
=======================

Validate country codes.

v1.0.1(1y ago)0378Apache-2.0PHPPHP ^7.3|^8.0

Since May 20Pushed 1y agoCompare

[ Source](https://github.com/eplayment/country-codes)[ Packagist](https://packagist.org/packages/eplayment/country-codes)[ RSS](/packages/eplayment-country-codes/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (4)Versions (4)Used By (0)

Country Codes
=============

[](#country-codes)

Validates 2 &amp; 3 character country codes.

 [ ![](https://camo.githubusercontent.com/554495f3bf1ff817698f29549a640fcc973fa4753014dec33b5bcb3fc7b3a881/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6c61726176656c2d76616c69646174696f6e2d72756c65732f636f756e7472792d636f6465732f43493f7374796c653d666c61742d737175617265) ](https://github.com/laravel-validation-rules/country-codes/actions) [ ![](https://camo.githubusercontent.com/5e0bf329af9b0208bda1e5ebb65fab32d0086cd0dfaec0e5eac181de228a8a3e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6c61726176656c2d76616c69646174696f6e2d72756c65732f636f756e7472792d636f6465732e7376673f7374796c653d666c61742d737175617265) ](https://github.com/laravel-validation-rules/country-codes/blob/master/LICENSE)

Installation
------------

[](#installation)

```
composer require laravel-validation-rules/country-codes
```

Usage
-----

[](#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],
]);
```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance46

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

409d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dad4e6532fb10f8ca8ceabf0a9af74e1435138a98f2fd3defd7685a0cc452e4d?d=identicon)[eplayment](/maintainers/eplayment)

---

Top Contributors

[![clarkeash](https://avatars.githubusercontent.com/u/1612186?v=4)](https://github.com/clarkeash "clarkeash (10 commits)")[![ssx](https://avatars.githubusercontent.com/u/254889?v=4)](https://github.com/ssx "ssx (10 commits)")[![woenel](https://avatars.githubusercontent.com/u/8844488?v=4)](https://github.com/woenel "woenel (3 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (2 commits)")[![keatliang2005](https://avatars.githubusercontent.com/u/473990?v=4)](https://github.com/keatliang2005 "keatliang2005 (1 commits)")[![DeepDiver1975](https://avatars.githubusercontent.com/u/1005065?v=4)](https://github.com/DeepDiver1975 "DeepDiver1975 (1 commits)")[![Kaz-](https://avatars.githubusercontent.com/u/7923839?v=4)](https://github.com/Kaz- "Kaz- (1 commits)")[![bilfeldt](https://avatars.githubusercontent.com/u/30228807?v=4)](https://github.com/bilfeldt "bilfeldt (1 commits)")[![sebdesign](https://avatars.githubusercontent.com/u/667144?v=4)](https://github.com/sebdesign "sebdesign (1 commits)")

---

Tags

laravelvalidationcountry

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/eplayment-country-codes/health.svg)

```
[![Health](https://phpackages.com/badges/eplayment-country-codes/health.svg)](https://phpackages.com/packages/eplayment-country-codes)
```

###  Alternatives

[propaganistas/laravel-phone

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

3.0k39.7M146](/packages/propaganistas-laravel-phone)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k16.9M110](/packages/bensampo-laravel-enum)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel

3893.6M1](/packages/axlon-laravel-postal-code-validation)[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.4M50](/packages/proengsoft-laravel-jsvalidation)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel-validation-rules/country-codes

Validate country codes.

34499.5k](/packages/laravel-validation-rules-country-codes)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
