PHPackages                             laravel-validation-rules/us-state - 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. laravel-validation-rules/us-state

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

laravel-validation-rules/us-state
=================================

Validate US States and Canada Provinces

1.9.0(1y ago)16181.0k—4.7%5[1 issues](https://github.com/laravel-validation-rules/us-state/issues)[1 PRs](https://github.com/laravel-validation-rules/us-state/pulls)Apache-2.0PHPCI failing

Since Sep 12Pushed 1y ago4 watchersCompare

[ Source](https://github.com/laravel-validation-rules/us-state)[ Packagist](https://packagist.org/packages/laravel-validation-rules/us-state)[ Docs](https://github.com/laravel-validation-rules/us-state)[ RSS](/packages/laravel-validation-rules-us-state/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (4)Versions (11)Used By (0)

State
=====

[](#state)

Validate US States, Canada Provinces, and Mexico States

 [ ![](https://camo.githubusercontent.com/aa3e5a07e6335427b1bd8c365a508df68fd2bdbaa62e30327616fba3e83a6428/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6c61726176656c2d76616c69646174696f6e2d72756c65732f75732d73746174652e7376673f7374796c653d666c61742d737175617265) ](https://travis-ci.org/laravel-validation-rules/us-state) [ ![](https://camo.githubusercontent.com/2dd24512e181d6c93003dd32154816c50fb17772142a590a2d9b6c29c34e32dd/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6c61726176656c2d76616c69646174696f6e2d72756c65732f75732d73746174652e7376673f7374796c653d666c61742d737175617265) ](https://scrutinizer-ci.com/g/laravel-validation-rules/us-state/code-structure/master/code-coverage) [ ![](https://camo.githubusercontent.com/583f908124ec30f89e69a0e895532c082e03687512832a5d9515c6ed1357a05a/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6c61726176656c2d76616c69646174696f6e2d72756c65732f75732d73746174652e7376673f7374796c653d666c61742d737175617265) ](https://scrutinizer-ci.com/g/laravel-validation-rules/us-state) [ ![](https://camo.githubusercontent.com/33f07a0fabfe2669abbf9d3d39873ef7283f9c86f1639c57d4e0c4bd057b2b2d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6c61726176656c2d76616c69646174696f6e2d72756c65732f75732d73746174652e7376673f7374796c653d666c61742d737175617265) ](https://github.com/laravel-validation-rules/us-state/blob/master/LICENSE) [ ![](https://camo.githubusercontent.com/11b33a21f687931b6830edabbf36761bf23f2ab7aa59259f78e91f4bcfc2fba6/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d4074796c657263643130302d626c75652e7376673f7374796c653d666c61742d737175617265) ](https://twitter.com/tylercd100)

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

[](#installation)

```
composer require laravel-validation-rules/us-state
```

Usage
-----

[](#usage)

```
use LVR\State\Abbr;
use LVR\State\Full;

# Abbreviation vs Full
$request->validate(['test' => 'UT'], ['test' => new Abbr]); // Pass!
$request->validate(['test' => 'BC'], ['test' => new Abbr); // Pass!
$request->validate(['test' => 'SON'], ['test' => new Abbr); // Pass!
$request->validate(['test' => 'Utah'], ['test' => new Full]); // Pass!
$request->validate(['test' => 'Alberta'], ['test' => new Full]); // Pass!
$request->validate(['test' => 'Sonora'], ['test' => new Full]); // Pass!

# Abbreviation - USA vs Canada vs Mexico
$request->validate(['test' => 'UT'], ['test' => new Abbr]); // Pass!
$request->validate(['test' => 'UT'], ['test' => new Abbr('US')]); // Pass!
$request->validate(['test' => 'BC'], ['test' => new Abbr('CA')); // Pass!
$request->validate(['test' => 'SON'], ['test' => new Abbr('MX')); // Pass!

# Full - USA vs Canada vs Mexico
$request->validate(['test' => 'Utah'], ['test' => new Full('US')]); // Pass!
$request->validate(['test' => 'Alberta'], ['test' => new Full('CA')]); // Pass!
$request->validate(['test' => 'Sonora'], ['text' => new Full('MX')]); // Pass!
```

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance42

Moderate activity, may be stable

Popularity42

Moderate usage in the ecosystem

Community18

Small or concentrated contributor base

Maturity69

Established project with proven stability

 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 ~306 days

Recently: every ~287 days

Total

10

Last Release

459d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/254889?v=4)[Scott](/maintainers/ssx)[@ssx](https://github.com/ssx)

![](https://www.gravatar.com/avatar/5d0f17a08e8038aafdd451317206dda9429dfda2c7cbadb0c0796e25367108d5?d=identicon)[tylercd100](/maintainers/tylercd100)

---

Top Contributors

[![tylercd100](https://avatars.githubusercontent.com/u/4522226?v=4)](https://github.com/tylercd100 "tylercd100 (11 commits)")[![ssx](https://avatars.githubusercontent.com/u/254889?v=4)](https://github.com/ssx "ssx (9 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (3 commits)")[![jeddtony](https://avatars.githubusercontent.com/u/28911142?v=4)](https://github.com/jeddtony "jeddtony (2 commits)")[![tmarquesini](https://avatars.githubusercontent.com/u/5427788?v=4)](https://github.com/tmarquesini "tmarquesini (1 commits)")

---

Tags

laravelprovincesrulesstatesvalidationlaravelvalidatorphonetylercd100

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/laravel-validation-rules-us-state/health.svg)

```
[![Health](https://phpackages.com/badges/laravel-validation-rules-us-state/health.svg)](https://phpackages.com/packages/laravel-validation-rules-us-state)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k95.4M306](/packages/laravel-horizon)[laravel/sail

Docker files for running a basic Laravel application.

1.9k205.7M1.3k](/packages/laravel-sail)[illuminate/database

The Illuminate Database package.

2.8k54.9M11.6k](/packages/illuminate-database)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M193](/packages/laravel-ai)[propaganistas/laravel-disposable-email

Disposable email validator

6023.0M6](/packages/propaganistas-laravel-disposable-email)

PHPackages © 2026

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