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

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

This package is not auto-updated.

Last update: 2024-03-12 02:54:49 UTC


README

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