Hello!
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?
Thanks!
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:
There are a couple ways to further this data validation and prevent a user from submitting bad data:
-
You could disable a submission button when an error has been triggered by referencing the invalid section of the a errored component:
-
You could trigger a notification through an event handler when the text input is changed to an invalid state:
-
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:
Would that work for you?