title: MVC validation Data Annotations are not rendering correct HTML5 attribute
body: <p>I am trying to understand why my MVC Data Annotations are not rendering the HTML 5 required tag. I think the problem is HTML5 &amp; MVC related not JQuery validate.</p>
  
  <p>According to <a href="http://www.w3schools.com/html/html5_form_attributes.asp" rel="nofollow">documentation here</a> it is supported in all browsers yet the three I dev against, IE, Chrome, Firefox are not rendering the attribute?</p>
  
  <p>My scenario I thought was pretty simplistic.</p>
  
  <p>MVC controller populates a model then passes to the view. User completes fields and clicks submit. Validation ALWAYS passes even if the fields are left blank? The model state is invalid so the controller kicks it back but I would have expected client side validation to have caught the empty fields. I have a jsfiddle to demonstrate but first let me provide the model.</p>
  
  <pre><code>public partial class FinRecordModel
  {        
      [Required]
      public virtual string FinName { get; set; }
  
      [Required]
      public virtual string PageLocation { get; set; }
  }
  </code></pre>
  
  <p>The view:</p>
  
  <pre><code>    @Html.LabelFor(model =&gt; model.FinName):
          &lt;/td&gt;
          &lt;td class="adminData"&gt;
              @Html.EditorFor(model =&gt; model.FinName)
              @Html.ValidationMessageFor(model =&gt; model.FinName)
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td class="adminTitle"&gt;
              @Html.LabelFor(model =&gt; model.PageLocation):
          &lt;/td&gt;
          &lt;td class="adminData"&gt;
              @Html.EditorFor(model =&gt; model.PageLocation)
              @Html.ValidationMessageFor(model =&gt; model.PageLocation)
          &lt;/td&gt;
  </code></pre>
  
  <p>I created this jsfiddle that uses the html as rendered by the browser and validation always passes.</p>
  
  <p><a href="http://jsfiddle.net/ramjet/mo0v2b76/5/" rel="nofollow">http://jsfiddle.net/ramjet/mo0v2b76/5/</a></p>
  
  <p>Now if I add the required attribute as seen in this jsfiddle then everything works as expected so just wondering what is going on???</p>
  
  <p><a href="http://jsfiddle.net/ramjet/mo0v2b76/6/" rel="nofollow">http://jsfiddle.net/ramjet/mo0v2b76/6/</a></p>
  
  <p>If this is HTML5 / MVC goofiness as the new HTML standard is still getting incorporated into the web then perhaps I should have a document onload function using jquery to add the required attribute to the input field?</p>
  
  <p>Thank You for your input / advice.</p>