title: MVC3 DropDownList not validating with [Required] class field as type int?
body: <p>Any idea why the following dropdownlist won't validate with required field as type int (the "Title" field below)?</p>
  
  <pre><code>    [Required]             // This works!
      [Display(Name = "Name")]
      public string Name { get; set; }
  
      [Required]             // This doesn't work 
      [Display(Name = "Title")]
      public int TitleId { get; set; }
  
  
  
       &lt;div class="editor-label"&gt;
          @Html.LabelFor(model =&gt; model.Name, "Name")
      &lt;/div&gt;
      &lt;div class="editor-field"&gt;
          @Html.EditorFor(model =&gt; model.Name)
          @Html.ValidationMessageFor(model =&gt; model.Name, "This can't be blank!")
      &lt;/div&gt;
  
      &lt;div class="editor-label"&gt;
          @Html.LabelFor(model =&gt; model.TitleId, "Title")
      &lt;/div&gt;
      &lt;div class="editor-field"&gt;
           @Html.DropDownListFor(model =&gt; model.TitleId, (SelectList)ViewBag.TitleId, String.Empty)
          @Html.ValidationMessageFor(model =&gt; model.TitleId)
      &lt;/div&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/bRpn9.png" alt="enter image description here"></p>