Skip to content

Commit

Permalink
Use Request::validate() macro in Auth traits (#26314)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmorbitzer authored and taylorotwell committed Oct 30, 2018
1 parent 2aa1526 commit d1dcac5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Auth/AuthenticatesUsers.php
Expand Up @@ -63,7 +63,7 @@ public function login(Request $request)
*/
protected function validateLogin(Request $request)
{
$this->validate($request, [
$request->validate([
$this->username() => 'required|string',
'password' => 'required|string',
]);
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Auth/ResetsPasswords.php
Expand Up @@ -37,7 +37,7 @@ public function showResetForm(Request $request, $token = null)
*/
public function reset(Request $request)
{
$this->validate($request, $this->rules(), $this->validationErrorMessages());
$request->validate($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 @@ -47,7 +47,7 @@ public function sendResetLinkEmail(Request $request)
*/
protected function validateEmail(Request $request)
{
$this->validate($request, ['email' => 'required|email']);
$request->validate(['email' => 'required|email']);
}

/**
Expand Down

0 comments on commit d1dcac5

Please sign in to comment.