2017 © Pedro Peláez
 

library laravel-validator-state

Validate that a states and provinces for US and Canada

image

tylercd100/laravel-validator-state

Validate that a states and provinces for US and Canada

  • Wednesday, October 18, 2017
  • by tylercd100
  • Repository
  • 1 Watchers
  • 1 Stars
  • 23 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 21 % Grown

The README.md

Validate states and provinces for USA and Canada with Laravel 5

Latest Version Software License Build Status Scrutinizer Code Quality Code Coverage Total Downloads, (*1)

This Package has moved to here for laravel 5.5+. Please use that instead. Also check out these other community validation rules, (*2)

Installation

Install via composer - In the terminal:, (*3)

composer require tylercd100/laravel-validator-state

Now add the following to the providers array in your config/app.php, (*4)

Tylercd100\Validator\State\ServiceProvider::class

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

The Versions

18/10 2017

dev-master

9999999-dev https://github.com/tylercd100/laravel-validator-state

Validate that a states and provinces for US and Canada

  Sources   Download

MIT

The Requires

 

The Development Requires

by Tyler Arbon

laravel validator phone tylercd100

13/04 2017

1.0.0

1.0.0.0 https://github.com/tylercd100/laravel-validator-state

Validate that a states and provinces for US and Canada

  Sources   Download

MIT

The Requires

 

The Development Requires

by Tyler Arbon

laravel validator phone tylercd100