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] Validate and Trim Input Field #293

Open
1 task done
shivam8112005 opened this issue Oct 15, 2024 · 0 comments · May be fixed by #298
Open
1 task done

[Bug] Validate and Trim Input Field #293

shivam8112005 opened this issue Oct 15, 2024 · 0 comments · May be fixed by #298
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟩 priority: low Low priority and doesn't need to be rushed 🏁 status: ready for work Ready for work

Comments

@shivam8112005
Copy link

Description

Currently, users can enter whitespace characters (spaces, tabs) in the search input field, which is not being handled properly. If the user submits the form with just whitespace, the form processes the input as a valid query. However, the form should treat input that contains only whitespace as invalid and display an error message, preventing submission.

Reproduction

  1. Open the search form.
  2. Enter a query that contains only spaces or tabs.
  3. Submit the form.

Expectation

  1. When the user submits the search form, any leading or trailing whitespace in the input should be removed (using trim()).
  2. If the input is empty (or becomes empty after trimming), the form should show an error message indicating that the query cannot be blank.
  3. The form should not proceed with the search if the query is invalid.

Environment

  • Device: laptop
  • OS: Windows 11
  • Browser: Chrome
  • Version: 117
  • Other info: 1920x1080

Additional context

This issue affects form validation for searches and user experience when submitting search queries.

Resolution

  • I would be interested in resolving this bug.
@shivam8112005 shivam8112005 added 💻 aspect: code Concerns the software code in the repository 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work 🛠 goal: fix Bug fix 🟧 priority: high Stalls work on the project or its dependents labels Oct 15, 2024
@cc-open-source-bot cc-open-source-bot moved this to Triage in WebDev Oct 15, 2024
@possumbilities possumbilities added 🟩 priority: low Low priority and doesn't need to be rushed 🏁 status: ready for work Ready for work and removed 🟧 priority: high Stalls work on the project or its dependents 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work labels Oct 15, 2024
@possumbilities possumbilities moved this from Triage to Backlog in WebDev Oct 15, 2024
@shivam8112005 shivam8112005 linked a pull request Oct 16, 2024 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟩 priority: low Low priority and doesn't need to be rushed 🏁 status: ready for work Ready for work
Projects
Status: Backlog
Development

Successfully merging a pull request may close this issue.

2 participants