title: Angular 4 form validation with input fields and checkboxes
body: <p>I have this form right here:</p>
  
  <pre><code>&lt;form (ngSubmit)="onSubmit()" #testForm="ngForm"&gt;
  
    &lt;div class="form-group col"&gt;
      &lt;label for="a"&gt;a&lt;/label&gt;
      &lt;select class="form-control" id="a" [(ngModel)]="form.a" name="a" required&gt;
        &lt;option value="x"&gt;x&lt;/option&gt;
        &lt;option value="y"&gt;y&lt;/option&gt;
      &lt;/select&gt;
    &lt;/div&gt;
  
    &lt;div class="form-group"&gt;
      &lt;label for="b"&gt;b&lt;/label&gt;
      &lt;input class="form-control" id="b" [(ngModel)]="form.b" name="b" required /&gt;
    &lt;/div&gt;
  
    &lt;div class="form-check"&gt;
      &lt;label class="form-check-label"&gt;
        &lt;input type="checkbox" class="form-check-input"&gt;c
      &lt;/label&gt;
    &lt;/div&gt;
  
    &lt;div class="form-check"&gt;
      &lt;label class="form-check-label"&gt;
        &lt;input type="checkbox" class="form-check-input"&gt;d
      &lt;/label&gt;
    &lt;/div&gt;
  
    &lt;div class="col text-right"&gt;
      &lt;button type="submit" class="btn btn-success" [disabled]="!testForm.form.valid"&gt;Submit&lt;/button&gt;
    &lt;/div&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p>With this component-code behind:</p>
  
  <pre><code>export class FormComponent {
    form = new Form();
    submitted = false;
    onSubmit() {
      this.submitted = true;
    }
  }
  </code></pre>
  
  <p>What I want to achieve is that my button only gets enabled, when both the dropdown and the input field are filled in, which works with the <code>required</code> attribute, AND both checkboxes are checked, which doesn't work.</p>
  
  <p>My question: Is there something like <code>required</code> for Checkboxes, or are there other ways to solve this problem?</p>