[#12449] Improve validation for the Feedback Session form #13185
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #12449
Outline of Solution
Enhanced Field Validation: Added a validation check for the "Instructions" field in the "New Feedback Session" form. If the "Instructions" field is left empty, an error message is displayed to notify the user that the field cannot be blank.
User Feedback: Updated the form template to display error messages below the affected fields, ensuring a clear indication of what needs to be corrected.
Code Updates: Modified the TypeScript component to manage the validation logic, including preventing form submission when required fields are empty.
Optional Field Addition: Added a new "Additional Information" field to provide users with an optional space for extra details.
Changes in the User Interface
If the "Instructions" field is left empty, the form displays an error message: "The Instructions field cannot be empty."
A new textarea labeled "Additional Information" has been added below the "Instructions" field, allowing users to provide supplementary details if needed.
Testing
Manually tested the form to ensure that validation messages appear correctly when required fields are empty.
Verified that the form cannot be submitted if the "Instructions" field is left blank.