Limit the number of characters

Hello,
I want to limit the number of characters in the blueprint text field.
For example, I want users to be able to write less than 30 characters, how should I write it?