Enhance Error Handling and Validation Feedback in Form Components

- Updated error handling in `EditSubmissionModal.vue`, `OpenCompleteForm.vue`, and `OpenForm.vue` to utilize a new `formValidationError` method for improved user feedback on validation issues.
- Introduced `formValidationError` function in `useAlert.js` to format and display validation errors more effectively, including detailed error messages for multiple fields.
- These changes aim to provide clearer and more actionable feedback to users when form submissions fail due to validation errors, enhancing the overall user experience.
This commit is contained in:
Julien Nahum
2025-03-26 20:05:23 +01:00
parent 66dd6899d3
commit 0d9c658638
4 changed files with 55 additions and 6 deletions

View File

@@ -61,6 +61,9 @@ const updateForm = (form, onFailure) => {
})
.catch((error) => {
console.error(error)
if (error?.data) {
useAlert().formValidationError(error.data)
}
loading.value = false
onFailure()
})