https://github.com/lee-to/moonshine-input-extension-char-count
https://github.com/lee-to/moonshine-input-extension-char-count
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/lee-to/moonshine-input-extension-char-count
- Owner: lee-to
- License: mit
- Created: 2023-04-20T16:53:05.000Z (about 2 years ago)
- Default Branch: 2.x
- Last Pushed: 2024-10-19T21:06:42.000Z (8 months ago)
- Last Synced: 2025-04-12T14:24:34.745Z (about 2 months ago)
- Language: PHP
- Size: 28.3 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
### Input extension - display the number of characters
Input extension - display the number of characters for MoonShine
### Requirements
- MoonShine v3.0+
### Support MoonShine versions
| MoonShine | CharCount |
|-------------|-----------|
| 1.0+ | 1.0+ |
| 2.0+ | 3.0+ |### Installation
```shell
composer require lee-to/moonshine-input-extension-char-count
``````php
use Leeto\InputExtensionCharCount\InputExtensions\CharCount;//
Text::make('Field')
->extension(new CharCount()),
// or
Text::make('Field')
->extension(new CharCount(250)),
// or
Text::make('Field')
->extension(new CharCount(45,5)),
```
Parameters:
max - integer. The value can be empty. The maximum number of characters allowed.
min - integer. The value can be empty. The minimum allowed number of characters.#### How does it look in the Admin Panel ?


> [!TIP]
> If the number of characters entered in the field is less than the min parameter or less than max*20%, then the maximum allowed number of characters will be highlighted in color.