title: How to make a field required, based on the value of another field
body: <p>I have a ViewModel with some public properties that have data annotations, like this:</p>
  
  <pre><code>[Required]
  public string PointOfContact { get; set; }
  </code></pre>
  
  <p>Which works just fine.   I've got all of the necessary plumbing in place to display the proper control formatting and error messages when validation fails.</p>
  
  <p>However, I have some fields that are <em>conditionally</em> required based on the value of a checkbox.  For example:</p>
  
  <pre><code>public bool Briefing { get; set; }
  public DateTime BriefingTime { get; set; }
  </code></pre>
  
  <p>In this case, I only want BriefingTime to be required if the checkbox that is bound to the Briefing property is checked.  The visibility of BriefingTime is already bound to Briefing, so all I need is for it to have the usual Required behavior when the checkbox is checked.</p>
  
  <p>Is there a way to do this out-of-the-box, or do I need to write my own Data Annotation class?  What would such a class look like?</p>