Created
October 23, 2017 09:59
-
-
Save niraj-shah/a2b341e30ad37a09276540f46ab9a300 to your computer and use it in GitHub Desktop.
Updating the Password Policy in Laravel 5.x's AuthController.php file
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
protected function validator(array $data) | |
{ | |
return Validator::make($data, [ | |
'name' => 'required|max:255', | |
'email' => 'required|email|max:255|unique:users', | |
'password' => 'required|confirmed|min:8|regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^a-zA-Z0-9]).+$/', | |
], [ | |
'password.regex' => 'Password must contain at least 1 lower-case and capital letter, a number and symbol.' | |
]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment