title: Required value in Html.TextBoxFor
body: <p>I need to put  the value of a <code>TextBox</code> required like this :</p>
  
  <pre><code>&lt;td&gt;@Html.TextBoxFor(m =&gt;(m.Code), new { @required  = "required"})&lt;/td&gt;
  </code></pre>
  
  <p>It works. But if i set a default value to the <code>TextBox</code> </p>
  
  <pre><code>&lt;td&gt;@Html.TextBoxFor(m =&gt;(m.Code), new { @Value = @Model.Code, @required  = "required"})&lt;/td&gt;
  </code></pre>
  
  <p>An empty value becomes accepted despite the generation of this Html code </p>
  
  <pre><code>&lt;td&gt;&lt;input id="Code" name="Code" required="required" type="text" value="fff       "&gt;&lt;/td&gt;
  </code></pre>
  
  <ol>
  <li>What is the source of this problem?</li>
  <li>How can i fix it?</li>
  </ol>