Skip to content

Commit

Permalink
Make it possible to add custom validation error messages on the Reset…
Browse files Browse the repository at this point in the history
…PasswordController (#16111)
  • Loading branch information
DrowningElysium authored and taylorotwell committed Oct 26, 2016
1 parent 12af396 commit b323ad7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Illuminate/Foundation/Auth/ResetsPasswords.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function showResetForm(Request $request, $token = null)
*/
public function reset(Request $request)
{
$this->validate($request, $this->rules());
$this->validate($request, $this->rules(), $this->validationErrorMessages());

// Here we will attempt to reset the user's password. If it is successful we
// will update the password on an actual user model and persist it to the
Expand Down Expand Up @@ -67,6 +67,16 @@ protected function rules()
];
}

/**
* Get the password reset validation error messages.
*
* @return array
*/
protected function validationErrorMessages()
{
return [];
}

/**
* Get the password reset credentials from the request.
*
Expand Down

0 comments on commit b323ad7

Please sign in to comment.