title: RangeValidator limiting that the ranges are 18 years after the date of birth
body: <p>This question may be difficult to convey. The goal is to make sure that the date inputted into the textbox is at least 18 years from the date of birth.</p>
  
  <p>I have a textbox:</p>
  
  <pre><code>&lt;asp:TextBox ID="DateFrom" runat="server"/&gt; 
  </code></pre>
  
  <p>I have a rangevalidator: </p>
  
  <pre><code>&lt;asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="DateFrom"    ErrorMessage="Age has to be more than 18 years" Type="Date"&gt;&lt;/asp:RangeValidator&gt;
  </code></pre>
  
  <p>and I have an entity object: </p>
  
  <pre><code>rvtxtExecutiveDateTo.MinimumValue = (insiderObj.Insider.dateBirth ??     DateTime.MinValue).ToString("MM/dd/yyyy");
  </code></pre>
  
  <p>I have set the range validator in the code behind to: </p>
  
  <pre><code> RangeValidator1.MinimumValue = (insiderObj.Insider.dateBirth ??    DateTime.MinValue.AddYears(-18)).ToString("MM/dd/yyyy");
  </code></pre>