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

[#12449] Improve validation for the Feedback Session form #13185

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

YingxuanT
Copy link

@YingxuanT YingxuanT commented Oct 20, 2024

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

  • Instructions Field Validation:

If the "Instructions" field is left empty, the form displays an error message: "The Instructions field cannot be empty."

  • Additional Information Field:

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.

截屏2024-10-20 下午5 19 29

Copy link

Hi @YingxuanT, thank you for your interest in contributing to TEAMMATES!
However, your PR does not appear to follow our contribution guidelines:

  • Title must start with the issue number the PR is fixing in square brackets, e.g. [#<issue-number>]
  • Description must reference the issue number the PR is fixing, e.g. Fixes #<issue-number> (or Part of #<issue-number> if the PR does not address the issue fully)

Please address the above before we proceed to review your PR.

@YingxuanT YingxuanT changed the title Improve new feedback session form 12449 [#12449] Improve validation for the Feedback Session form Oct 20, 2024
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.

Improve New Feedback Session Form
1 participant