Skip to content

[Text Input]: validationMessage doesn't showed with isInvalid flag #1572

Discussion options

You must be logged in to vote

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 the TextInput 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 the LabeledInput, making it complicated to eliminate the 'validationMessage' prop from lens.

We will improve our documentation, to make this part more clear.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by AlexeyNovomlinets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug Something isn't working
2 participants
Converted from issue

This discussion was converted from issue #1571 on August 07, 2023 10:49.