| Package Data | |
|---|---|
| Maintainer Username: | tylercd100 |
| Maintainer Contact: | tylercd100@gmail.com (Tyler Arbon) |
| Package Create Date: | 2017-04-13 |
| Package Last Update: | 2017-10-18 |
| Home Page: | |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-10-27 03:07:46 |
| Package Statistics | |
|---|---|
| Total Downloads: | 44 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 1 |
| Total Watchers: | 1 |
| Total Forks: | 0 |
| Total Open Issues: | 0 |
This Package has moved to here for laravel 5.5+. Please use that instead. Also check out these other community validation rules
Install via composer - 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
# 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