PHPackages                             respect/validation-locale - 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. [Localization &amp; i18n](/categories/localization)
4. /
5. respect/validation-locale

AbandonedArchivedLibrary[Localization &amp; i18n](/categories/localization)

respect/validation-locale
=========================

A set of Respect\\Validation rules to work with localization

143.6k2[1 PRs](https://github.com/Respect/ValidationLocale/pulls)PHP

Since Jun 19Pushed 4y ago4 watchersCompare

[ Source](https://github.com/Respect/ValidationLocale)[ Packagist](https://packagist.org/packages/respect/validation-locale)[ RSS](/packages/respect-validation-locale/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Respect\\ValidationLocale
=========================

[](#respectvalidationlocale)

A set of Respect\\Validation rules to work with localization.

Country
-------

[](#country)

- `v::country()`
- `v::country(string $set)`

Validates country codes according to [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1 "ISO 3166-1").

```
v::country()->validate('BR'); //true
```

By default we choose [ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 "ISO 3166-1 alpha-2") but you can use [ISO 3166-1 alpha-3](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-3 "ISO 3166-1 alpha-3")and [ISO 3166-1 numeric](http://en.wikipedia.org/wiki/ISO_3166-1_numeric "ISO 3166-1 numeric") as well.

```
v::country('alpha-2')->validate('US'); //true
v::country('alpha-3')->validate('USA'); //true
v::country('numeric')->validate('840'); //true
```

This rule is case sensitive.

All data of this rule was extrated from [GeoNames](http://www.geonames.org "GetNames") which is licensed under a [Creative Commons Attribution 3.0 License](http://creativecommons.org/licenses/by/3.0 "Creative Commons Attribution 3.0 License").

CountrySubdivision
------------------

[](#countrysubdivision)

- `v::countrySubdivision(string $entry)`

Validates country codes according to [ISO 3166-2](http://en.wikipedia.org/wiki/ISO_3166-2 "ISO 3166-2").

The `$entry` must be a country in [ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 "ISO 3166-1 alpha-2") format.

```
v::countrySubdivision('BR')->validate('SP'); //true
v::countrySubdivision('US')->validate('CA'); //true
```

This rule is case sensitive.

All data of this rule was extrated from [GeoNames](http://www.geonames.org "GetNames") which is licensed under a [Creative Commons Attribution 3.0 License](http://creativecommons.org/licenses/by/3.0 "Creative Commons Attribution 3.0 License").

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/202642?v=4)[Alexandre Gomes Gaigalas](/maintainers/alganet)[@alganet](https://github.com/alganet)

![](https://avatars.githubusercontent.com/u/154023?v=4)[Henrique Moody](/maintainers/henriquemoody)[@henriquemoody](https://github.com/henriquemoody)

![](https://www.gravatar.com/avatar/4343df4adee634d5953da73aa5b61e4af61dbd37bf4e97449240c8a32c142dc5?d=identicon)[augustohp](/maintainers/augustohp)

---

Top Contributors

[![henriquemoody](https://avatars.githubusercontent.com/u/154023?v=4)](https://github.com/henriquemoody "henriquemoody (258 commits)")

### Embed Badge

![Health badge](/badges/respect-validation-locale/health.svg)

```
[![Health](https://phpackages.com/badges/respect-validation-locale/health.svg)](https://phpackages.com/packages/respect-validation-locale)
```

###  Alternatives

[joedixon/laravel-translation

A tool for managing all of your Laravel translations

717911.4k11](/packages/joedixon-laravel-translation)[illuminate/translation

The Illuminate Translation package.

6936.4M495](/packages/illuminate-translation)[lajax/yii2-translate-manager

Translation management extension for Yii 2

227578.8k13](/packages/lajax-yii2-translate-manager)[larswiegers/laravel-translations-checker

Make sure your laravel translations are checked and are included in all languages.

256423.2k2](/packages/larswiegers-laravel-translations-checker)[inpsyde/multilingual-press

Simply THE multisite-based free open source plugin for your multilingual websites.

2414.0k1](/packages/inpsyde-multilingual-press)[statikbe/laravel-chained-translator

The Laravel Chained Translator can combine several translators that can override each others translations.

36149.4k6](/packages/statikbe-laravel-chained-translator)

PHPackages © 2026

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