title: AngularJS radiogroup required
body: <p>I have the following HTML, I need to require a radio selection. Not sure how to do it in AngularJS.</p>
  
  <pre><code>&lt;div class="form-group"&gt;
      &lt;label class="control-label pull-left"&gt;&lt;small&gt;Type of M (&lt;i&gt;check one&lt;/i&gt;):&lt;/small&gt;&lt;/label&gt;
      &lt;div class="col-md-5 pull-left"&gt;
          &lt;label class="radio-inline pull-left"&gt;
              &lt;input type="radio" name="radio" ng-model="m.pr.MType" value="PrRep"&gt; PrRep
          &lt;/label&gt;
          &lt;label class="radio-inline pull-left"&gt;
              &lt;input type="radio" name="radio" ng-model="m.pr.MType" value="LProd"&gt; LProd
          &lt;/label&gt;
      &lt;/div&gt;
      &lt;div class="input-group col-md-3"&gt;
          &lt;div class="input-group-sm"&gt;
              &lt;label&gt;&lt;small&gt;Prod LNum&lt;/small&gt;&lt;/label&gt;
              &lt;input type="text" class="form-control" id="provProdLNum" ng-model="m.pr.prodLNum" ng-required="m.pr.MType != 'PrRep'" /&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I've tried this:</p>
  
  <pre><code>&lt;input type="radio" name="radio" ng-model="m.pr.MType" value="PrRep" required&gt; PrRep
  &lt;input type="radio" name="radio" ng-model="m.pr.MType" value="LProd" required&gt; LProd
  </code></pre>
  
  <p>and this:</p>
  
  <pre><code>&lt;input type="radio" name="radio" ng-model="m.pr.MType" value="PrRep" ng-required="m.pr.MType != ''"&gt; PrRep
  &lt;input type="radio" name="radio" ng-model="m.pr.MType" value="LProd" ng-required="m.pr.MType != ''"&gt; LProd
  </code></pre>
  
  <p>Not sure which is the correct one to use here...</p>