> For the complete documentation index, see [llms.txt](https://deltaclan.gitbook.io/superform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://deltaclan.gitbook.io/superform/superform-v0/validation-attributes/characters-count-min-max.md).

# Characters Count (Min/Max)

## Information

**Attribute:** <mark style="color:red;">`superform-chars-min = number`</mark> or <mark style="color:red;">`superform-chars-max = number`</mark>

**Apply to:** all text-related `input`, `textarea`, tag elements.

Validates specified input/textarea for minimum and/or maximum character length.&#x20;

{% hint style="info" %}
**Eg: "I want this input text to receive between 4-10 characters"**

Apply: superform-chars-min = 4, superform-chars-max=10
{% endhint %}

{% hint style="warning" %}
Remember that you need to always apply **superform-validate="identifier"** so your input can enter the validation process.
{% endhint %}

<figure><img src="https://1615520621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhC4q4SkuRcLPZQrmF5BR%2Fuploads%2FnywLsbi8sJFtKZKe67mS%2Fimage.png?alt=media&amp;token=1e93413d-9c9b-4584-9f15-dfa20c653d5a" alt=""><figcaption><p>1) both <strong>superform-validate="name"</strong> to mark it for validation<br>and <strong>superform-chars-min="1"</strong> to allow only <strong>at least 1</strong> character</p></figcaption></figure>

<figure><img src="https://1615520621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhC4q4SkuRcLPZQrmF5BR%2Fuploads%2FBBBsbWdqPXLOd4NpICa9%2Fimage.png?alt=media&amp;token=35dad5ee-e282-4d67-bab7-ffdc20bc1053" alt=""><figcaption><p>2) <strong>superform-error="name"</strong> to show corresponding error text message.</p></figcaption></figure>

## Related Links

{% content-ref url="/pages/C4JRfk2w38FdHO2mlk3p" %}
[Validate & Error (must read)](/superform/superform-v0/validation-attributes/validate-and-error-must-read.md)
{% endcontent-ref %}
