title: DropDownListFor Unobtrusive Validation Required Not getting correct attributes
body: <p><a href="https://stackoverflow.com/questions/2551187/validation-on-dropdownlistfor-not-working-with-dataannotations">This Question</a> is similar but the accepted answer solves it server side, I'm interested in client side solutions.</p>
  
  <p>Given this ViewModel</p>
  
  <pre><code>public class MyViewModel
  {
      public string ID { get; set; }
  
      [Required(ErrorMessage = "I DEMAND YOU MAKE A CHOICE!")]
      [Display(Name = "Some Choice")]
      public int SomeChoice{ get; set; }   
      [Required(ErrorMessage = "I DEMAND YOU MAKE A CHOICE!")]
      [Display(Name = "Keyword")]
      public string Keyword { get; set; }    
  }
  </code></pre>
  
  <p>and the razor</p>
  
  <pre><code>&lt;div&gt;
  @Html.LabelFor(model =&gt; model.SomeChoice, new { @class = "label" })
  @Html.DropDownListFor(model =&gt; model.SomeChoice, (SelectList)ViewBag.SomeChoice, "Select...")
  @Html.ValidationMessageFor(model =&gt; model.SomeChoice)
  &lt;/div&gt;
  </code></pre>
  
  <p>and assume ViewBag.SomeChoice contains a select list of choices</p>
  
  <p>The rendered html doesn't get the data-val="true" data-val-required="I DEMAND YOU MAKE A CHOICE!" attributes in it like  @Html.EditorFor(model => model.Keyword) or @Html.TextBoxFor would render.</p>
  
  <p><strong><em>WHY?</em></strong></p>
  
  <p>Adding a class = "required" to it like so</p>
  
  <pre><code>@Html.DropDownListFor(model =&gt; model.SomeChoice, (SelectList)ViewBag.SomeChoice, "Select...", new { @class = "required" })
  </code></pre>
  
  <p>which uses the jQuery Validation class semantics and blocks on submit but doesn't display the message. I can do this kind of thing</p>
  
  <pre><code>@Html.DropDownListFor(model =&gt; model.SomeChoice, (SelectList)ViewBag.SomeChoice, "Select...", new Dictionary&lt;string, object&gt; { { "data-val", "true" }, { "data-val-required", "I DEMAND YOU MAKE A CHOICE!" } })
  </code></pre>
  
  <p>Which will put the right attributes there, and blocks on submit and shows the message but doesn't take advantage of the RequiredAttribute ErrorMessage I have on my ViewModel</p>
  
  <p><em>So has anyone written a DropDownListFor that behaves like the other HtmlHelpers with regard to Validation?</em></p>
  
  <p><em>EDIT</em>
  Here is my EXACT code</p>
  
  <p>In HomeController.cs</p>
  
  <pre><code>  public class MyViewModel
    {
      [Required(ErrorMessage = "I DEMAND YOU MAKE A CHOICE!")]
      [Display(Name = "Some Choice")]
      public int? SomeChoice { get; set; }
    }
  
  
      public ActionResult About()
      {
          var items = new[] { new SelectListItem { Text = "A", Value = "1" }, new SelectListItem { Text = "B", Value = "2" }, new SelectListItem { Text = "C", Value = "3" }, };
          ViewBag.SomeChoice = new SelectList(items,"Value", "Text");
          ViewData.Model = new MyViewModel {};
          return View();
      }
  </code></pre>
  
  <p>About.cshtml</p>
  
  <pre><code>@using Arc.Portal.Web.Host.Controllers
  @model MyViewModel
  &lt;script src="@Url.Content("~/Scripts/jquery.validate.js")" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")" type="text/javascript"&gt;&lt;/script&gt;
  
  @using (Html.BeginForm())
  {
  &lt;div&gt;
      @Html.LabelFor(model =&gt; model.SomeChoice)
      @Html.DropDownListFor(model =&gt; model.SomeChoice, (SelectList)ViewBag.SomeChoice, "Select...")
      @Html.ValidationMessageFor(model =&gt; model.SomeChoice)
  &lt;/div&gt;
  
  &lt;button type="submit"&gt;OK&lt;/button&gt;
  }
  </code></pre>
  
  <p>And here is the rendered code</p>
  
  <pre><code>&lt;form action="/Home/About" method="post"&gt;    &lt;div&gt;
      &lt;label for="SomeChoice"&gt;Some Choice&lt;/label&gt;
      &lt;select id="SomeChoice" name="SomeChoice"&gt;&lt;option value=""&gt;Select...&lt;/option&gt;
  &lt;option value="1"&gt;A&lt;/option&gt;
  &lt;option value="2"&gt;B&lt;/option&gt;
  &lt;option value="3"&gt;C&lt;/option&gt;
  &lt;/select&gt;
      &lt;span class="field-validation-valid" data-valmsg-for="SomeChoice" data-valmsg-replace="true"&gt;    &lt;/span&gt;
  &lt;/div&gt;
  &lt;button type="submit"&gt;OK&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>It posts back to my controller...this shouldn't happen</p>