carbon
carbon copied to clipboard
Add error prop to the Search component
Desired behaviour
We have a requirement to show error on Search component (Image attached) when user tries to search with less than 2 characters.

Current behaviour
Seems like there are no error props for Search component as of now like we have for Textbox and Multiselect which lets us add custom error text and also turns border to red color.
Suggested Solution
No response
CodeSandbox or Storybook URL
No response
Anything else we should know?
Desired functionality is implemented already for Textbox and Multiselect components which lets us add custom error text and also turns border to red color.
Confidentiality
- [X] I confirm there is no confidential or commercially sensitive information included.
@ljemmo are DS ok with us enabling the textbox error styling on search?
@nicktitchmarsh Yes, happy for you to enable this. Can we make sure that the red error border is visible on to the left of the green search button though?
Also, can we make sure this error doesn't appear after 1 key press. Rather it should appear after enter is hit or the green button is selected.
FE-5292
@ljemmo we would supply the props for consuming apps to control. How the validation is triggered is down to implementing teams
:tada: This issue has been resolved in version 110.5.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket: