Is there a build in way to achieve this (showing t...
# compose
t
Is there a build in way to achieve this (showing the error under the field, recommended by the material guidelines) with
OutlinedTextField
I did not manage to find one?

https://i.stack.imgur.com/ptvLF.png

p
I don’t think there is a build in way in Compose, but you can simply create your own composable looking something like this
Copy code
Column {
    TextField()
    errorText?.let {
      RedText(text = it)
    }
  }
👍 1
t
Yeah, that’s how I did it, but it seemed like there should be a build-in way 🙂 Thanks
a
The compose way is generally to point towards approaches like the above instead of adding many configuration parameters to achieve different built-in variations
t
OutlinedTextField
actually accepts a ton of things, and there’s even a parameter which states
isError
so my expectations was that since it tries to follow the material guidelines there would be a way to just pass the message.
👍 1