Skip to content

Commit

Permalink
Encouraging better password formats and unifying two validation samples
Browse files Browse the repository at this point in the history
  • Loading branch information
igorsantos07 committed Nov 1, 2015
1 parent 79413d7 commit c1e1344
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ How often do you find yourself re-creating the same boilerplate code in the appl
```php
Route::post('register', function() {
$rules = array(
'name' => 'required|min:3|max:80|alpha_dash',
'email' => 'required|between:3,64|email|unique:users',
'password' => 'required|alpha_num|between:4,8|confirmed',
'password_confirmation' => 'required|alpha_num|between:4,8'
'name' => 'required|between:3,80|alpha_dash',
'email' => 'required|between:5,64|email|unique:users',
'password' => 'required|min:6|confirmed',
'password_confirmation' => 'required|min:6'
);

$validator = Validator::make(Input::all(), $rules);
Expand Down Expand Up @@ -153,10 +153,10 @@ Ardent models use Laravel's built-in [Validator class](http://laravel.com/docs/v
```php
class User extends \LaravelBook\Ardent\Ardent {
public static $rules = array(
'name' => 'required|between:4,16',
'email' => 'required|email',
'password' => 'required|alpha_num|between:4,8|confirmed',
'password_confirmation' => 'required|alpha_num|between:4,8',
'name' => 'required|between:3,80|alpha_dash',
'email' => 'required|between:5,64|email|unique:users',
'password' => 'required|min:6|confirmed',
'password_confirmation' => 'required|min:6',
);
}
```
Expand Down

0 comments on commit c1e1344

Please sign in to comment.