Fix search validation and input handling#2070
Open
Maznu007 wants to merge 1 commit intoTusharKesarwani:mainfrom
Open
Fix search validation and input handling#2070Maznu007 wants to merge 1 commit intoTusharKesarwani:mainfrom
Maznu007 wants to merge 1 commit intoTusharKesarwani:mainfrom
Conversation
✅ Deploy Preview for frontendprojects ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🛠️ Issue (2061)
Closes #2061
Description
This pull request improves the search functionality on the homepage by adding proper input validation and user feedback.
Previously, the search bar did not handle empty input, numeric-only input, special characters, or overly long input correctly. It also did not provide any feedback to the user when invalid input was entered.
Changes made:
Reset to show all projects when search input is empty
Added validation to prevent special characters and invalid input
Ensured search queries must contain at least one alphabet character
Limited search input to a maximum of 40 characters
Displayed a user-friendly validation message when input is invalid
Used encodeURIComponent to safely handle search parameters
These changes improve usability and provide a clearer user experience.
Type of change
Bug fix (non-breaking change which fixes an issue)
Checklist:
I have made this from my own
My code follows the style guidelines of this project
I have performed a self-review of my own code
My changes generate no new warnings
The title of my pull request is a short description of the requested changes.