molotov/laravel-canpost-validator

There is no license information available for the latest version (v1.0.0) of this package.

Canadian postal code validator for Laravel 4x

Installs: 12

Dependents: 0

Suggesters: 0

Stars: 1

Watchers: 1

Forks: 3

Open Issues: 0

v1.0.0 2013-11-12 16:08 UTC

README

Just what it says.

Usage

1) Install with composer

{
  "require": {
    "molotov/laravel-canpost-validator": "1.0.*"
  }
}

2) Add the service provider to your project's autoloader in /app/config/app.php

'providers' => array(
  // ...
  'Molotov\CanpostValidator\CanpostValidatorServiceProvider'
);

3) 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);