You could use javascript like the following in your application.js:
$("input").attr("maxlength", 4)
Here is a demo: http://jsfiddle.net/TmsXG/13/
This doesn't answer my question. I don't want to limit the amount of characters users input--I want to know how many characters the text box supports.