Skip to content

Instantly share code, notes, and snippets.

Created October 23, 2017 09:59
What would you like to do?
Updating the Password Policy in Laravel 5.x's AuthController.php file
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