PHPackages                             tylercd100/laravel-validator-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. tylercd100/laravel-validator-state

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

tylercd100/laravel-validator-state
==================================

Validate that a states and provinces for US and Canada

1.0.0(9y ago)144MITPHPPHP ^5.5.9|^7.0

Since Apr 13Pushed 8y ago1 watchersCompare

[ Source](https://github.com/tylercd100/laravel-validator-state)[ Packagist](https://packagist.org/packages/tylercd100/laravel-validator-state)[ Docs](https://github.com/tylercd100/laravel-validator-state)[ RSS](/packages/tylercd100-laravel-validator-state/feed)WikiDiscussions master Synced 4w ago

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

Validate states and provinces for USA and Canada with Laravel 5
===============================================================

[](#validate-states-and-provinces-for-usa-and-canada-with-laravel-5)

[![Latest Version](https://camo.githubusercontent.com/f8f1b7b6ab4e8bd2eaee8bf0369a41ba736356e8e281e21ede8f12ae911528e3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f74796c657263643130302f6c61726176656c2d76616c696461746f722d73746174652e7376673f7374796c653d666c61742d737175617265)](https://github.com/tylercd100/laravel-validator-state/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/26fd4f7590325b68a0a9d8143dc9dd54fdc98bad25414677a5204f43ba16aa49/68747470733a2f2f7472617669732d63692e6f72672f74796c657263643130302f6c61726176656c2d76616c696461746f722d73746174652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/tylercd100/laravel-validator-state)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/c225421d22cce6dddda7c5052a778d34cd4dad05d59d8e5975e561fb6ed9fab6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f74796c657263643130302f6c61726176656c2d76616c696461746f722d73746174652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/tylercd100/laravel-validator-state/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/4ef9a783ed265245170322bab4262ee3774d409e26d01de32c8886fb6b162785/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f74796c657263643130302f6c61726176656c2d76616c696461746f722d73746174652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/tylercd100/laravel-validator-state/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/f6247a8be41e6b9a0023a2975917d60857034316b51ffd8fe7e2f0c6326df1a6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74796c657263643130302f6c61726176656c2d76616c696461746f722d73746174652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tylercd100/laravel-validator-state)

**This Package has moved to [here](https://github.com/laravel-validation-rules/us-state) for laravel 5.5+. Please use that instead. Also check out these other [community validation rules](https://laravel-validation-rules.github.io/)**

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

[](#installation)

Install via [composer](https://getcomposer.org/) - In the terminal:

```
composer require tylercd100/laravel-validator-state
```

Now add the following to the `providers` array in your `config/app.php`

```
Tylercd100\Validator\State\ServiceProvider::class
```

Usage
-----

[](#usage)

```
# USA vs Canada
Validator::make(['test' => 'UT'], ['test' => 'state']); //true
Validator::make(['test' => 'UT'], ['test' => 'state:usa']); //true
Validator::make(['test' => 'BC'], ['test' => 'state:canada']); //true

# Abbreviation vs Full
Validator::make(['test' => 'Utah'], ['test' => 'state:full']); //true
Validator::make(['test' => 'UT'], ['test' => 'state:abbr']); //true

# Mix and match
Validator::make(['test' => 'UT'], ['test' => 'state:usa,abbr']); //true
Validator::make(['test' => 'Alberta'], ['test' => 'state:canada,full']); //true
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3365d ago

### Community

Maintainers

![](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 (6 commits)")

---

Tags

laravellaravel-5provincesstatesvalidationlaravelvalidatorphonetylercd100

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tylercd100-laravel-validator-state/health.svg)

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

###  Alternatives

[propaganistas/laravel-phone

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

3.0k38.3M139](/packages/propaganistas-laravel-phone)[sunspikes/clamav-validator

Custom Laravel anti-virus validator for file uploads using ClamAV.

3712.0M5](/packages/sunspikes-clamav-validator)[propaganistas/laravel-disposable-email

Disposable email validator

6012.9M7](/packages/propaganistas-laravel-disposable-email)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2422.3M6](/packages/laravel-validation-rules-credit-card)[proengsoft/laravel-jsvalidation

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

1.1k2.3M50](/packages/proengsoft-laravel-jsvalidation)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77018.2M122](/packages/laravel-mcp)

PHPackages © 2026

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