title: Set maximum length in Text field in RoR
body: <p>Has anyone managed to set maximum field lenghts for text fields</p>
  
  <p>How can i set the maximum length of a text field.
  Here is the code iam using</p>
  
  <pre><code>&lt;%= text_field_tag(:create_text), :input_html =&gt; {:maxlength =&gt; 15, :size =&gt; 40}  %&gt;
  </code></pre>
  
  <p>but I cannot seem to set the max number of characters that can be typed into
  the field.</p>