title: Angula.JS: checkbox array validation
body: <p>I have a set of checkboxes in a form. How can I validate the form when at least one of them is checked?</p>
  
  <pre><code>&lt;div class="col-lg-9 col-md-9 col-sm-9 col-xs-9" ng-init="row.user_input = {}"&gt;
      &lt;div ng-repeat="value in row.allowed_values" class="checkbox-inline"&gt;
          &lt;input type="checkbox"
                 name="{{row.field}}"
                 value="{{value}}"
                 ng-model="row.user_input[value]"
                 ng-required="{{row.mandatory_field &amp;&amp; !someSelected(row.user_input)}}"&gt;{{value | capitalize}}
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><a href="https://stackoverflow.com/questions/35899369/angularjs-validate-checkbox-array">Here</a> a whole bunch of details.</p>