title: How to add "required" attribute to mvc razor viewmodel text input editor
body: <p>I have the following MVC 5 Razor HTML helper:</p>
  
  <pre><code>@Html.TextBoxFor(m =&gt; m.ShortName, 
    new { @class = "form-control", @placeholder = "short name"})
  </code></pre>
  
  <p>I need this field to be required (i.e. have a red outline when user navigates out without putting a value inn). In a WebForms HTML 5 I could just say <code>&lt;input type="text" required /&gt;</code> to have this effect.
  What is the proper syntax to accomplish this in a Razor syntax?</p>