ic-ui-kit icon indicating copy to clipboard operation
ic-ui-kit copied to clipboard

Add custom validation options for the search field component

Open DBD324 opened this issue 1 year ago โ€ข 1 comments

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.

DBD324 avatar Feb 27 '24 13:02 DBD324

How would this display?

MI6-255 avatar May 08 '24 08:05 MI6-255