# GrapeCity.ActiveReports.PageReportModel.Validation.ValidationUtils.Validate

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_ActiveReports_PageReportModel_Validation_ValidationUtils_Validate_" data-uid="GrapeCity.ActiveReports.PageReportModel.Validation.ValidationUtils.Validate*">Validate Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_ActiveReports_PageReportModel_Validation_ValidationUtils_Validate_" data-uid="GrapeCity.ActiveReports.PageReportModel.Validation.ValidationUtils.Validate*"></a>
<h4 id="GrapeCity_ActiveReports_PageReportModel_Validation_ValidationUtils_Validate_GrapeCity_ActiveReports_PageReportModel_Length_" data-uid="GrapeCity.ActiveReports.PageReportModel.Validation.ValidationUtils.Validate(GrapeCity.ActiveReports.PageReportModel.Length)">Validate(Length)</h4>
<div class="markdown level1 summary"><p>Validates a length value against the RDL defined min/max length defaults (&quot;0in&quot;,&quot;160in&quot;).</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static Length Validate(Length value)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="GrapeCity.ActiveReports.PageReportModel.Length.html">Length</a></td>
      <td><span class="parametername">value</span></td>
      <td><p>A <a class="xref" href="GrapeCity.ActiveReports.PageReportModel.Length.html">Length</a> value to validate.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="GrapeCity.ActiveReports.PageReportModel.Length.html">Length</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="GrapeCity.ActiveReports.PageReportModel.ReportDefinitionException.html">ReportDefinitionException</a></td>
      <td><p>Throws if the value is out of range limit.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_ActiveReports_PageReportModel_Validation_ValidationUtils_Validate_" data-uid="GrapeCity.ActiveReports.PageReportModel.Validation.ValidationUtils.Validate*"></a>
<h4 id="GrapeCity_ActiveReports_PageReportModel_Validation_ValidationUtils_Validate__1___0_" data-uid="GrapeCity.ActiveReports.PageReportModel.Validation.ValidationUtils.Validate``1(``0)">Validate&lt;T&gt;(T)</h4>
<div class="markdown level1 summary"><p>Validates a value to make sure it is valid enum value.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static T Validate&lt;T&gt;(T value) where T : Enum</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="xref">T</span></td>
      <td><span class="parametername">value</span></td>
      <td><p>A value to validate.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="xref">T</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
<h5 class="typeParameters">Type Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="parametername">T</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_PageReportModel_Validation_ValidationUtils_Validate__1___0__examples">Examples</h5>
<pre><code class="lang-csharp">OrderByCondition value = OrderByCondition.Value;
ValidationUtils.Validate(value);</code></pre>

<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.invalidenumargumentexception">InvalidEnumArgumentException</a></td>
      <td><p>Throws if the value is not valid enum of <span class="xref">Enum</span> type.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
