Text Area Max length has no effect

I set Max lenght in Text Area to 10.
I thought that this would limit the input to max 10 characters, but I can still enter more than 10 characters. How can I actually limit the text length here?

Hi @paul84!

I don't think that the validation section with the new text area component actually stops a user from entering more characters but controls whether or not the error message is displayed: image

There are a couple ways to further this data validation and prevent a user from submitting bad data:

  1. You could disable a submission button when an error has been triggered by referencing the invalid section of the a errored component:

  2. You could trigger a notification through an event handler when the text input is changed to an invalid state:

  3. You could disable the query to prevent users from submitting bad data:

Hey @paul84,

@JoeyKarczewski is correct. Retool doesn't natively restrict new input. But if you really want to restrict further input in the UI you could try out something like this:

2022-01-10 15.29.27

Would that work for you?


This is super clever @minijohn!

Hats off to you!

1 Like


Really enjoyed your last article on boldtech, superlative implementation!