title: ASP.NET MVC 3 unobtrusive validation and radio buttons
body: <p>I'm trying to do required validation on a list of radio buttons to force the user to select an option to continue. The validation does work but it only outputs metadata on the first radio button and it only marks the first radio button with the class input-validation-error.</p>
  
  <p>Example:</p>
  
  <pre><code>&lt;p&gt;@Html.RadioButtonFor(x =&gt; x.Choices, SomeEnum.OptionOne)&lt;/p&gt;
  &lt;p&gt;@Html.RadioButtonFor(x =&gt; x.Choices, SomeEnum.OptionTwo)&lt;/p&gt;
  </code></pre>
  
  <p>Resulting HTML:</p>
  
  <pre><code>&lt;p&gt;&lt;input class="input-validation-error" data-val="true" data-val-required="required text" type="radio" name="Choices" value="OptionOne" /&gt;&lt;/p&gt;
  &lt;p&gt;&lt;input type="radio" name="Choices" value="OptionTwo" /&gt;&lt;/p&gt;
  </code></pre>
  
  <p>I want both radio buttons to get the validation error-class or it might risk skewing what option the user selects.</p>
  
  <p>What can I do?</p>