<commit_before># Craft Overflow Field Type
The Overflow field type displays the number of characters entered in a field, and the total number of "recommended" characters. If the user exceeds the recommended total, the counter turns red.

![An example Overflow field.][overflowScreenshot]

[overflowScreenshot]: ./docs/img/screenshot.png "An example Overflow field" height=231px width=447px

Unlike the standard Craft Plain Text field type, Overflow also _enforces_ the maximum character count, allowing you to set both a "soft limit" and a "hard limit" on the field.

## Requirements
Overflow has been tested with Craft 2.1.

## Installation
1. Download and unzip the Overflow plugin.
2. Move the `overflow` directory to your `/craft/plugins` directory.
3. Go to the "Settings &rarr; Plugins" page in your admin area, and click on the "Install" button next to the Overflow plugin.

## Field Configuration
An Overflow field accepts two optional settings:

1. **Soft Limit** is the _recommended_ maximum number of characters. Setting this to a positive integer will cause Overflow to display a message beneath the field detailing the number of characters entered, and the soft limit (e.g. "21 of 25").
2. **Hard Limit** is _absolute_ maximum number of characters. Setting this to a positive integer will cause Overflow to add the `maxlength` attribute to the form field, thereby limiting the number of characters that the field will accept.

Note that whilst it is possible to make the soft limit larger than the hard limit, it makes no sense to do so.<commit_msg>(Attempt to) fix README image reference.<commit_after># Craft Overflow Field Type
The Overflow field type displays the number of characters entered in a field, and the total number of "recommended" characters. If the user exceeds the recommended total, the counter turns red.

![An example Overflow field](docs/img/screenshot.png)

Unlike the standard Craft Plain Text field type, Overflow also _enforces_ the maximum character count, allowing you to set both a "soft limit" and a "hard limit" on the field.

## Requirements
Overflow has been tested with Craft 2.1.

## Installation
1. Download and unzip the Overflow plugin.
2. Move the `overflow` directory to your `/craft/plugins` directory.
3. Go to the "Settings &rarr; Plugins" page in your admin area, and click on the "Install" button next to the Overflow plugin.

## Field Configuration
An Overflow field accepts two optional settings:

1. **Soft Limit** is the _recommended_ maximum number of characters. Setting this to a positive integer will cause Overflow to display a message beneath the field detailing the number of characters entered, and the soft limit (e.g. "21 of 25").
2. **Hard Limit** is _absolute_ maximum number of characters. Setting this to a positive integer will cause Overflow to add the `maxlength` attribute to the form field, thereby limiting the number of characters that the field will accept.

Note that whilst it is possible to make the soft limit larger than the hard limit, it makes no sense to do so.
{'fraction_non_alphanumeric': 0.05601048149361284, 'fraction_numerical': 0.00917130691123485, 'mean_word_length': 4.624309392265193, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5572990', 'n_tokens_mistral': 779, 'n_tokens_neox': 743, 'n_words': 468}