Skip to content

Fix search validation and input handling#2070

Open
Maznu007 wants to merge 1 commit intoTusharKesarwani:mainfrom
Maznu007:fix-search-validation
Open

Fix search validation and input handling#2070
Maznu007 wants to merge 1 commit intoTusharKesarwani:mainfrom
Maznu007:fix-search-validation

Conversation

@Maznu007
Copy link
Copy Markdown

@Maznu007 Maznu007 commented Mar 2, 2026

🛠️ 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.

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 2, 2026

Deploy Preview for frontendprojects ready!

Name Link
🔨 Latest commit b658bc9
🔍 Latest deploy log https://app.netlify.com/projects/frontendprojects/deploys/69a5e5f9bce0ea0008bec1dd
😎 Deploy Preview https://deploy-preview-2070--frontendprojects.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

Search Bar Does Not Handle Empty or Invalid Input Correctly

1 participant