# FarPoint.Win.Spread.TextLengthValidator

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="FarPoint_Win_Spread_TextLengthValidator" data-uid="FarPoint.Win.Spread.TextLengthValidator" class="text-break">TextLengthValidator Class
</h1>
  <div class="markdown level0 summary"><p>Represents a special <a class="xref" href="FarPoint.Win.Spread.TextLengthValidator.html">TextLengthValidator</a> that validates the length of the specified value using the <a class="xref" href="FarPoint.Win.Spread.TextLengthValidator.LengthUnit.html#FarPoint_Win_Spread_TextLengthValidator_LengthUnit">LengthUnit</a> setting.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="FarPoint.Win.Spread.BaseDataValidator.html">BaseDataValidator</a></div>
    <div class="level2"><span class="xref">TextLengthValidator</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.icloneable">ICloneable</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.runtime.serialization.iserializable">ISerializable</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.runtime.serialization.ideserializationcallback">IDeserializationCallback</a></div>
    <div><a class="xref" href="../FarPoint.Win/FarPoint.Win.ISerializeSupport.html">ISerializeSupport</a></div>
    <div><a class="xref" href="FarPoint.Win.Spread.INamedObject.html">INamedObject</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="FarPoint.Win.Spread.html">FarPoint.Win.Spread</a></h6>
  <h6><strong>Assembly</strong>: FarPoint.Win.Spread.dll</h6>
  <h5 id="FarPoint_Win_Spread_TextLengthValidator_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">[ToolboxBitmap(typeof(FpSpread), &quot;TextLengthValidator.png&quot;)]
[TypeConverter(typeof(TextLengthValidator._a))]
public class TextLengthValidator : BaseDataValidator, ICloneable, ISerializable, IDeserializationCallback, ISerializeSupport, INamedObject</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">&lt;ToolboxBitmap(GetType(FpSpread), &quot;TextLengthValidator.png&quot;)&gt;
&lt;TypeConverter(GetType(TextLengthValidator._a))&gt;
Public Class TextLengthValidator
    Inherits BaseDataValidator
    Implements ICloneable, ISerializable, IDeserializationCallback, ISerializeSupport, INamedObject</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="FarPoint_Win_Spread_TextLengthValidator__ctor" data-uid="FarPoint.Win.Spread.TextLengthValidator.#ctor">
          <a class="xref" href="FarPoint.Win.Spread.TextLengthValidator.-ctor.html#FarPoint_Win_Spread_TextLengthValidator__ctor">TextLengthValidator()</a>
        </td>
        <td class="markdown level1 summary"><p>Represents the default empty constructor.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_TextLengthValidator__ctor_System_Runtime_Serialization_SerializationInfo_System_Runtime_Serialization_StreamingContext_" data-uid="FarPoint.Win.Spread.TextLengthValidator.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
          <a class="xref" href="FarPoint.Win.Spread.TextLengthValidator.-ctor.html#FarPoint_Win_Spread_TextLengthValidator__ctor_System_Runtime_Serialization_SerializationInfo_System_Runtime_Serialization_StreamingContext_">TextLengthValidator(SerializationInfo, StreamingContext)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of this class.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="FarPoint_Win_Spread_TextLengthValidator_Encoding" data-uid="FarPoint.Win.Spread.TextLengthValidator.Encoding">
          <a class="xref" href="FarPoint.Win.Spread.TextLengthValidator.Encoding.html#FarPoint_Win_Spread_TextLengthValidator_Encoding">Encoding</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the encoding.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_TextLengthValidator_EncodingCodePage" data-uid="FarPoint.Win.Spread.TextLengthValidator.EncodingCodePage">
          <a class="xref" href="FarPoint.Win.Spread.TextLengthValidator.EncodingCodePage.html#FarPoint_Win_Spread_TextLengthValidator_EncodingCodePage">EncodingCodePage</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the encoding code page.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_TextLengthValidator_LengthUnit" data-uid="FarPoint.Win.Spread.TextLengthValidator.LengthUnit">
          <a class="xref" href="FarPoint.Win.Spread.TextLengthValidator.LengthUnit.html#FarPoint_Win_Spread_TextLengthValidator_LengthUnit">LengthUnit</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the <a class="xref" href="FarPoint.Win.Spread.TextLengthValidator.LengthUnit.html#FarPoint_Win_Spread_TextLengthValidator_LengthUnit">LengthUnit</a> used to validate the text length.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_TextLengthValidator_MaximumLength" data-uid="FarPoint.Win.Spread.TextLengthValidator.MaximumLength">
          <a class="xref" href="FarPoint.Win.Spread.TextLengthValidator.MaximumLength.html#FarPoint_Win_Spread_TextLengthValidator_MaximumLength">MaximumLength</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the maximum length of the text.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_TextLengthValidator_MinimumLength" data-uid="FarPoint.Win.Spread.TextLengthValidator.MinimumLength">
          <a class="xref" href="FarPoint.Win.Spread.TextLengthValidator.MinimumLength.html#FarPoint_Win_Spread_TextLengthValidator_MinimumLength">MinimumLength</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the minimum length of the text.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_TextLengthValidator_NullIsValid" data-uid="FarPoint.Win.Spread.TextLengthValidator.NullIsValid">
          <a class="xref" href="FarPoint.Win.Spread.TextLengthValidator.NullIsValid.html#FarPoint_Win_Spread_TextLengthValidator_NullIsValid">NullIsValid</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets whether the validation always succeeds when the specified value is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="FarPoint_Win_Spread_TextLengthValidator_Clone_GrapeCity_Spreadsheet_Conditional_ConditionalObjects_GrapeCity_Spreadsheet_DataValidator_GrapeCity_Spreadsheet_DataValidation_GrapeCity_Spreadsheet_DataValidationExecutedResult__ConditionalObject_GrapeCity_CalcEngine_FormulaEngine_GrapeCity_CalcEngine_FormulaEngine_" data-uid="FarPoint.Win.Spread.TextLengthValidator.Clone(GrapeCity.Spreadsheet.Conditional.ConditionalObjects{GrapeCity.Spreadsheet.DataValidator,GrapeCity.Spreadsheet.DataValidation,GrapeCity.Spreadsheet.DataValidationExecutedResult}.ConditionalObject,GrapeCity.CalcEngine.FormulaEngine,GrapeCity.CalcEngine.FormulaEngine)">
          <a class="xref" href="FarPoint.Win.Spread.TextLengthValidator.Clone.html#FarPoint_Win_Spread_TextLengthValidator_Clone_GrapeCity_Spreadsheet_Conditional_ConditionalObjects_GrapeCity_Spreadsheet_DataValidator_GrapeCity_Spreadsheet_DataValidation_GrapeCity_Spreadsheet_DataValidationExecutedResult__ConditionalObject_GrapeCity_CalcEngine_FormulaEngine_GrapeCity_CalcEngine_FormulaEngine_">Clone(ConditionalObject, FormulaEngine, FormulaEngine)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates an exact copy of the current <a class="xref" href="FarPoint.Win.Spread.BaseDataValidator.html">BaseDataValidator</a>.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_TextLengthValidator_Deserialize_System_Xml_XmlNodeReader_" data-uid="FarPoint.Win.Spread.TextLengthValidator.Deserialize(System.Xml.XmlNodeReader)">
          <a class="xref" href="FarPoint.Win.Spread.TextLengthValidator.Deserialize.html#FarPoint_Win_Spread_TextLengthValidator_Deserialize_System_Xml_XmlNodeReader_">Deserialize(XmlNodeReader)</a>
        </td>
        <td class="markdown level1 summary"><p>Loads the object from XML.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_TextLengthValidator_GetObjectData_System_Runtime_Serialization_SerializationInfo_System_Runtime_Serialization_StreamingContext_" data-uid="FarPoint.Win.Spread.TextLengthValidator.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
          <a class="xref" href="FarPoint.Win.Spread.TextLengthValidator.GetObjectData.html#FarPoint_Win_Spread_TextLengthValidator_GetObjectData_System_Runtime_Serialization_SerializationInfo_System_Runtime_Serialization_StreamingContext_">GetObjectData(SerializationInfo, StreamingContext)</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the object data.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_TextLengthValidator_Serialize_System_Xml_XmlTextWriter_" data-uid="FarPoint.Win.Spread.TextLengthValidator.Serialize(System.Xml.XmlTextWriter)">
          <a class="xref" href="FarPoint.Win.Spread.TextLengthValidator.Serialize.html#FarPoint_Win_Spread_TextLengthValidator_Serialize_System_Xml_XmlTextWriter_">Serialize(XmlTextWriter)</a>
        </td>
        <td class="markdown level1 summary"><p>Saves the object to XML.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_Spread_TextLengthValidator_Validate_FarPoint_Win_Spread_ValidateActionContext_" data-uid="FarPoint.Win.Spread.TextLengthValidator.Validate(FarPoint.Win.Spread.ValidateActionContext)">
          <a class="xref" href="FarPoint.Win.Spread.TextLengthValidator.Validate.html#FarPoint_Win_Spread_TextLengthValidator_Validate_FarPoint_Win_Spread_ValidateActionContext_">Validate(ValidateActionContext)</a>
        </td>
        <td class="markdown level1 summary"><p>Validates whether the specified value satisfy the given condition by the <code class="paramref">context</code>.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
