Quick Tip Forcing More Complex Passwords in Laravel
With the great Laravel Docs I will quickly show how to “encourage” the user to set a better password.
Going through the standard docs for Authentication we end up with a registration form.
Then in the AuthController that comes with Laravel I modify it a bit.
protected function validator(array $data)
{
$messages = ['password.regex' => "Your password must contain 1 lower case character 1 upper case character one number"];
return Validator::make($data, [
'name' => 'required|max:255',
'email' => 'required|email|max:255|unique:users',
'password' => 'required|confirmed|min:8|regex:/^(?