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

🐛Bug: Feedback Form Submits Empty String #1415

Open
vishwajeet1729 opened this issue Feb 17, 2025 · 2 comments
Open

🐛Bug: Feedback Form Submits Empty String #1415

vishwajeet1729 opened this issue Feb 17, 2025 · 2 comments
Labels
🐛 Bug Indicates that the issue is a bug or defect. Status: Triage This is the initial status for an issue that requires triage.

Comments

@vishwajeet1729
Copy link

vishwajeet1729 commented Feb 17, 2025

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

Image

Device Information [optional]

- OS:
- Browser:
- version:

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;
}

@vishwajeet1729 vishwajeet1729 added Status: Triage This is the initial status for an issue that requires triage. 🐛 Bug Indicates that the issue is a bug or defect. labels Feb 17, 2025
Copy link

Welcome to the JSON Schema Community. We are so excited you are here! Thanks a lot for reporting your first issue!! 🎉🎉 Please make sure to take a look at our contributors guide if you plan on opening a pull request.
For more details, check out the README.md file.

@vishwajeet1729
Copy link
Author

waiting for the assigning of the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Indicates that the issue is a bug or defect. Status: Triage This is the initial status for an issue that requires triage.
Projects
None yet
Development

No branches or pull requests

1 participant