title: Either Or Required Validation
body: <p>I want to use ComponentModel DataAnnotations validate that at least one of two properties has a value. My model looks like this:</p>
  
  <pre><code>public class FooModel {
     public string Bar1 { get; set; }
     public int Bar2 { get; set; }
  }
  </code></pre>
  
  <p>Basically, <strong>I want to validate FooModel so that either Bar1 <em>or</em> Bar2 is required</strong>. In other words, you can enter one, or the other, or both, but you can't just leave them both empty.</p>
  
  <p><strong>I would prefer that this worked both for server-side and unobtrusive client-side validation.</strong></p>
  
  <hr>
  
  <p>EDIT: This may be a <a href="https://stackoverflow.com/questions/2712511/data-annotations-for-validation-at-least-one-required-field">possible duplicate, as this looks similar to what I'm looking to do</a></p>