Skip to content

Commit

Permalink
Installation and usage info
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Coderre committed Nov 12, 2013
1 parent b41b7c2 commit b7ae13a
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,31 @@
laravel-canpost-validator
=========================
## Canadian postal code validator for Laravel 4.x

Canadian postal code validator for Laravel 4x
Just what it says.

### Usage

1) Install with composer

```js
{
"require": {
"molotov/laravelcanpost-validator": "1.0.*"
}
}
```

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

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

0 comments on commit b7ae13a

Please sign in to comment.