lee-to / moonshine-input-extension-char-count
Input extension - display the number of characters
2.0.0
2024-10-19 20:59 UTC
Requires
- php: ^8.0|^8.1|^8.2
- ext-curl: *
- ext-json: *
Requires (Dev)
- brianium/paratest: ^6.8
- mockery/mockery: ^1.4.4
- orchestra/testbench: ^4.0|^5.0|^6.0|^7.0|^8.0
- phpstan/phpstan: ^1.4.7
- phpunit/phpunit: ^9.5.8
Conflicts
- moonshine/moonshine: <3.0
README
Input extension - display the number of characters
Input extension - display the number of characters for MoonShine
Requirements
- MoonShine v3.0+
Support MoonShine versions
Installation
composer require lee-to/moonshine-input-extension-char-count
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.