title: attribute dependent on another field
body: <p>In a model of my ASP.NET MVC application I would like validate a textbox as required only if a specific checkbox is checked.</p>
  
  <p>Something like</p>
  
  <pre><code>public bool retired {get, set};
  
  [RequiredIf("retired",true)]
  public string retirementAge {get, set};
  </code></pre>
  
  <p>How can I do that?</p>
  
  <p>Thank you.</p>