Max TextEntry Characters

Hello.

Does anyone know how I can set the maximum character amount for a TextEntry field? I found one thread about it but none of the solutions worked for me.

Thanks