Skip to content

Instantly share code, notes, and snippets.

@niraj-shah
Created October 23, 2017 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niraj-shah/a2b341e30ad37a09276540f46ab9a300 to your computer and use it in GitHub Desktop.
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
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