[Text Input]: validationMessage doesn't showed with isInvalid flag #1572
-
Description (optional)There is no message for invalid input with provided validationMessage. Steps to Reproduce
Actual resultExpected resultShow invalid message Environment
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Could you please provide any details? |
Beta Was this translation helpful? Give feedback.
-
The validationMessage is rendered by the Our approach is that components should not render anything outside their border-box, which is why the validation message is rendered by We will improve our documentation, to make this part more clear. |
Beta Was this translation helpful? Give feedback.
Hi @AlexeyNovomlinets,
The validationMessage is rendered by the
LabeledInput
component. You can find the documentation and examples for it here - LabeledInput Documentation.Our approach is that components should not render anything outside their border-box, which is why the validation message is rendered by
LabeledInput
. However, we also have the same prop in theTextInput
interface, which might seem confusing. This was done because we follow a pattern with our forms, where we spread the lens to the component and to theLabeledInput
, making it complicated to eliminate the 'validationMessage' prop from lens.We will improve our documentation, to make this part more clear.