🐛Bug: Feedback Form Submits Empty String #1415
Labels
🐛 Bug
Indicates that the issue is a bug or defect.
Status: Triage
This is the initial status for an issue that requires triage.
Describe the bug
The feedback form allows submission even when the comment field is empty. This results in blank feedback entries being recorded.
Steps To Reproduce
Leave the "feedback-comment" field empty.
Click the submit button.
The form submits successfully instead of showing an error
Expected Behavior
The form should prevent submission when the comment field is empty and display an error message instead.
Screenshots
Device Information [optional]
Are you working on this issue?
Yes
Do you think this work might require an [Architectural Decision Record (ADR)]? (significant or noteworthy)
No
Solution:
code to be added in the file website/components/DocsHelp.tsx
const feedbackComment = formData.get('feedback-comment')?.toString().trim();
if (!feedbackComment) {
setError('Feedback comment cannot be empty.');
return false;
}
The text was updated successfully, but these errors were encountered: