Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add clearErrors on DeleteUserForm on closeModal function #406

Merged
merged 5 commits into from
Sep 9, 2024

Conversation

radumargina
Copy link
Contributor

Closing Modal with validation errors, from DeleteUserForm component, will reset the password input but will NOT reset the input validation errors.

Adding clearErrors on closeModal function will resolve this issue.

Steps to reproduce:

  • Open Profile Page
  • Click Delete Account
  • Submit form with empty password input, appears validation error
  • Click Cancel to close modal (input value will be cleared, but validation error not)
  • Click Delete Account again, form will be empty but validation error will persist

Changed files:

  • stubs/inertia-react-ts/resources/js/Pages/Profile/Partials/DeleteUserForm.tsx
  • stubs/inertia-react/resources/js/Pages/Profile/Partials/DeleteUserForm.jsx
  • stubs/inertia-vue-ts/resources/js/Pages/Profile/Partials/DeleteUserForm.vue
  • stubs/inertia-vue/resources/js/Pages/Profile/Partials/DeleteUserForm.vue

radumargina and others added 5 commits September 7, 2024 17:48
Closing delete user modal with validation errors it will reset the input but not reset the validation errors.
Adding clearErrors on closeModal function will resolve this issue.
@taylorotwell taylorotwell merged commit 666ea22 into laravel:2.x Sep 9, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants