Add custom validation options for the search field component
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.
How would this display?