title: Form validation - Required one of many in a group
body: <p>In the project I'm working on at the moment I currently have three textboxes and I need to validate that at least one of the text boxes has been populated.</p>
  
  <p>I've been reading into custom validation with Angular directives and I understand you can set the validity of an input in a directive's link function using the following:</p>
  
  <pre><code>ctrl.$parsers.unshift(function(viewValue) {
    // validation logic here
  });
  </code></pre>
  
  <p>The problem I have is that I don't need to set an individual input's validity.. I need to invalidate the entire form if the criteria isn't met. I just wonder how to approach this?</p>
  
  <p>I'm thinking maybe I should create a directive that's placed on the enclosing form itself and then make the form invalid?</p>
  
  <p>I suppose I'm just looking for some guidance into how I should go about this because I'm a little unclear where to start - all the material I'm reading on custom validation seems to be for when you're validating a specific input as opposed to a set of conditions on a form.</p>
  
  <p>I hope I've made myself clear! Thanks..</p>