From c1e1344c4fb40e3a9386c01aa64e964676e20e42 Mon Sep 17 00:00:00 2001 From: Igor Santos Date: Sun, 1 Nov 2015 20:18:15 -0200 Subject: [PATCH] Encouraging better password formats and unifying two validation samples --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6032c94..470a53b 100644 --- a/README.md +++ b/README.md @@ -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); @@ -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', ); } ```