-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Guillaume Coderre
committed
Nov 12, 2013
1 parent
b41b7c2
commit b7ae13a
Showing
1 changed file
with
30 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
``` |