title: MVC3 TextBoxFor adding a class removes the input-validation-error validation css class
body: <p>I have a textboxfor control on my razor view:</p>
  
  <pre><code>@Html.TextBoxFor(model =&gt; model.PrimaryAddressLine1)
  </code></pre>
  
  <p>If the user leaves this field blank the validation will add class="input-validation-error" to the field changing its color to red (as expected). However if i try to add a custom css class to the field like so:</p>
  
  <pre><code>@Html.TextBoxFor(model =&gt; model.PrimaryAddressLine1, new { @Class = "addressfield" })
  </code></pre>
  
  <p>I loose the red color as the "input-validation-error" class is no longer added to the control.</p>
  
  <p>How can i keep the red color and add my custom css class?</p>