Skip to content

Commit 19572f4

Browse files
authored
Remove password confirmation requirement (#254)
1 parent 82c99b6 commit 19572f4

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/Http/Controllers/NewPasswordController.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ public function store(Request $request): Responsable
5757
$request->validate([
5858
'token' => 'required',
5959
Fortify::email() => 'required|email',
60-
'password' => 'required|confirmed',
61-
'password_confirmation' => 'required',
60+
'password' => 'required',
6261
]);
6362

6463
// Here we will attempt to reset the user's password. If it is successful we

tests/NewPasswordControllerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,14 @@ public function test_password_can_be_reset_with_customized_email_address_field()
128128
$response->assertRedirect('/login');
129129
}
130130

131-
public function test_password_and_password_confirmation_are_required()
131+
public function test_password_is_required()
132132
{
133133
$response = $this->post('/reset-password', [
134134
'token' => 'token',
135135
'email' => '[email protected]',
136136
]);
137137

138138
$response->assertStatus(302);
139-
$response->assertSessionHasErrors(['password', 'password_confirmation']);
139+
$response->assertSessionHasErrors(['password']);
140140
}
141141
}

0 commit comments

Comments
 (0)