Limit the number of character for text fields

I would like to limit the number of characters users can write in multiple lines text field.
Today I can only count characters and display an alarm over a certain limit, but I cannot unable the user to write more.