Add custom validation options for the search field component
- Dominant language
- TypeScript
- Stars
- 53
- Forks
- 63
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 15
Description
## Summary
Currently, the search bar has no ability to add custom validation. Providing this function would make the component more felxible for more use cases.
## 💬 Description
Allow a status message to be displayed with the search bar showing any of the default status types. Allow the message to be customized and the validation logic to be specified.
This would align with the same approach provided on text field.
## 💰 User value
Allows search bar to be used in more use cases and enhances flexibility of component.
## 📚 User Stories
If relevant, describe the high-level functionality as user stories.
*As an* ICDS user:
*I need* to set a custom validation rule and status message on a search bar
*So that* I can message users about any errors, warnings or success info in same way as other ICDS components.
## 📝 Acceptance Criteria
If relevant, describe in full detail the different interactions and edge cases that the component or patterns needs to fulfil.
*Given*
*When*
*Then*
## ✏ Designs
If there's a Figma design file (or other mock-up), include it here.
## 🧾 Guidance
If there's written guidance or documentation, include a link to it here.
## Additional info
Tell us anything else useful to help us understand your suggestion.
Contributor guide
Research direction
Start by locating the search field component and comparing its current API with the text field approach referenced in the issue. The work is complete when the search bar accepts custom validation logic, displays a configurable message, and supports the default status types described in the request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100