Skip to content

Commit

Permalink
Merge pull request #12997 from TheGIBSON/5.2
Browse files Browse the repository at this point in the history
[5.2] Add messages and custom attributes to the password reset validation
  • Loading branch information
taylorotwell committed Apr 5, 2016
2 parents 01c8dc1 + 5aa0359 commit ac19ee9
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion src/Illuminate/Foundation/Auth/ResetsPasswords.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,12 @@ public function postReset(Request $request)
*/
public function reset(Request $request)
{
$this->validate($request, $this->getResetValidationRules());
$this->validate(
$request,
$this->getResetValidationRules(),
$this->getResetValidationMessages(),
$this->getResetValidationCustomAttributes()
);

$credentials = $request->only(
'email', 'password', 'password_confirmation', 'token'
Expand Down Expand Up @@ -217,6 +222,26 @@ protected function getResetValidationRules()
];
}

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

/**
* Get the password reset validation custom attributes.
*
* @return array
*/
protected function getResetValidationCustomAttributes()
{
return [];
}

/**
* Reset the given user's password.
*
Expand Down

0 comments on commit ac19ee9

Please sign in to comment.