Skip to content

Commit 1cd1566

Browse files
authored
Clears any validation error message before re-displaying confirmation (#487)
It's a small change, but it should be OK. 🤓 Previously, there was a **very minor** issue if the following steps were followed: - log in - navigate to profile - delete account - enter incorrect password - note the validation error message - close confirmation window via ESC or Nevermind - delete account...again The issue: the validation error message is still displayed. I've simply added `$this->resetErrorBag();` to make sure that validation errors are cleared each time the user attempts to delete their account. Please let me know if there are any problems/questions. Thx...! 🤓
1 parent a563ab2 commit 1cd1566

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Http/Livewire/DeleteUserForm.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ class DeleteUserForm extends Component
3232
*/
3333
public function confirmUserDeletion()
3434
{
35+
$this->resetErrorBag();
36+
3537
$this->password = '';
3638

3739
$this->dispatchBrowserEvent('confirming-delete-user');

0 commit comments

Comments
 (0)