Skip to content

adamsullovey/laravel-canpost-validator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Canadian postal code validator for Laravel 4.x

Just what it says.

Usage

  1. Install with composer
{
  "require": {
    "molotov/laravel-canpost-validator": "1.0.*"
  }
}
  1. Add the service provider to your project's autoloader in /app/config/app.php
'providers' => array(
  // ...
  'Molotov\CanpostValidator\CanpostValidatorServiceProvider'
);
  1. Use it by adding canadian_postal_code to your attribute's validation rules.
$rules = array('postal_code' => 'canadian_postal_code|required');
Validator::make($attributes, $rules);

About

Canadian postal code validator for Laravel 4.x

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%