# GrapeCity.ActiveReports.PageReportModel.Validation.ValidationUtils.ValidateInteger

## Content

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



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



<a id="GrapeCity_ActiveReports_PageReportModel_Validation_ValidationUtils_ValidateInteger_" data-uid="GrapeCity.ActiveReports.PageReportModel.Validation.ValidationUtils.ValidateInteger*"></a>
<h4 id="GrapeCity_ActiveReports_PageReportModel_Validation_ValidationUtils_ValidateInteger_System_Int32_System_Int32_System_Int32_" data-uid="GrapeCity.ActiveReports.PageReportModel.Validation.ValidationUtils.ValidateInteger(System.Int32,System.Int32,System.Int32)">ValidateInteger(int, int, int)</h4>
<div class="markdown level1 summary"><p>Validates an integer value to make sure it is valid and is within the specified min/max range limit.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static int ValidateInteger(int value, int min, int max)</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="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">value</span></td>
      <td><p>An <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a> value to validate.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">min</span></td>
      <td><p>An <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a> value representing the minimum integer allowed.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">max</span></td>
      <td><p>An <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a> value representing the maximum integer allowed.</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="https://learn.microsoft.com/dotnet/api/system.int32">int</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_ValidateInteger_" data-uid="GrapeCity.ActiveReports.PageReportModel.Validation.ValidationUtils.ValidateInteger*"></a>
<h4 id="GrapeCity_ActiveReports_PageReportModel_Validation_ValidationUtils_ValidateInteger_System_Int32_" data-uid="GrapeCity.ActiveReports.PageReportModel.Validation.ValidationUtils.ValidateInteger(System.Int32)">ValidateInteger(int)</h4>
<div class="markdown level1 summary"><p>Validates an integer value to make sure it is valid and is within the specified usual default RDL min/max range limit (0, int.maxvalue).</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static int ValidateInteger(int 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="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">value</span></td>
      <td><p>An <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</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="https://learn.microsoft.com/dotnet/api/system.int32">int</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_ValidateInteger_" data-uid="GrapeCity.ActiveReports.PageReportModel.Validation.ValidationUtils.ValidateInteger*"></a>
<h4 id="GrapeCity_ActiveReports_PageReportModel_Validation_ValidationUtils_ValidateInteger_System_Nullable_System_Int32__System_Int32_System_Int32_" data-uid="GrapeCity.ActiveReports.PageReportModel.Validation.ValidationUtils.ValidateInteger(System.Nullable{System.Int32},System.Int32,System.Int32)">ValidateInteger(int?, int, int)</h4>
<div class="markdown level1 summary"><p>Validates a nullable integer value to make sure it is valid and is within the specified min/max range limit.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static void ValidateInteger(int? value, int min, int max)</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="https://learn.microsoft.com/dotnet/api/system.int32">int</a>?</td>
      <td><span class="parametername">value</span></td>
      <td><p>An <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a> value to validate.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">min</span></td>
      <td><p>An <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a> value representing the minimum integer allowed.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">max</span></td>
      <td><p>An <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a> value representing the maximum integer allowed.</p>
</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_ValidateInteger_" data-uid="GrapeCity.ActiveReports.PageReportModel.Validation.ValidationUtils.ValidateInteger*"></a>
<h4 id="GrapeCity_ActiveReports_PageReportModel_Validation_ValidationUtils_ValidateInteger_System_Nullable_System_Int32__" data-uid="GrapeCity.ActiveReports.PageReportModel.Validation.ValidationUtils.ValidateInteger(System.Nullable{System.Int32})">ValidateInteger(int?)</h4>
<div class="markdown level1 summary"><p>Validates a nullable integer value to make sure it is valid and is within the specified usual default RDL min/max range limit (0, int.maxvalue).</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static void ValidateInteger(int? 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="https://learn.microsoft.com/dotnet/api/system.int32">int</a>?</td>
      <td><span class="parametername">value</span></td>
      <td><p>An <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a> value to validate.</p>
</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_ValidateInteger_" data-uid="GrapeCity.ActiveReports.PageReportModel.Validation.ValidationUtils.ValidateInteger*"></a>
<h4 id="GrapeCity_ActiveReports_PageReportModel_Validation_ValidationUtils_ValidateInteger_GrapeCity_Enterprise_Data_Expressions_ExpressionInfo_System_Int32_System_Int32_" data-uid="GrapeCity.ActiveReports.PageReportModel.Validation.ValidationUtils.ValidateInteger(GrapeCity.Enterprise.Data.Expressions.ExpressionInfo,System.Int32,System.Int32)">ValidateInteger(ExpressionInfo, int, int)</h4>
<div class="markdown level1 summary"><p>Valiates an expression value to make sure it is valid integer value and is within the specified min/max values.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static void ValidateInteger(ExpressionInfo expression, int min, int max)</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="../MESCIUS.ActiveReports.Core.Data.ExpressionInfo/GrapeCity.Enterprise.Data.Expressions.ExpressionInfo.html">ExpressionInfo</a></td>
      <td><span class="parametername">expression</span></td>
      <td><p>An <a class="xref" href="../MESCIUS.ActiveReports.Core.Data.ExpressionInfo/GrapeCity.Enterprise.Data.Expressions.ExpressionInfo.html">ExpressionInfo</a> value to validate.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">min</span></td>
      <td><p>An <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a> value representing the minimun size allowed.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">max</span></td>
      <td><p>An <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a> value representing the maximum size allowed.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_PageReportModel_Validation_ValidationUtils_ValidateInteger_GrapeCity_Enterprise_Data_Expressions_ExpressionInfo_System_Int32_System_Int32__examples">Examples</h5>
<pre><code class="lang-csharp">ExpressionInfo value = ExpressionInfo.FromString("2");
ValidationUtils.ValidateInteger(value, 1, 5);</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="GrapeCity.ActiveReports.PageReportModel.ReportDefinitionException.html">ReportDefinitionException</a></td>
      <td><p>Throws if the value is out of range limit.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
