Download the PHP package agungsp/filament-cleave-input without Composer
On this page you can find all versions of the php package agungsp/filament-cleave-input. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download agungsp/filament-cleave-input
More information about agungsp/filament-cleave-input
Files in agungsp/filament-cleave-input
Package filament-cleave-input
Short Description This is my package filament-cleave-input
License MIT
Homepage https://github.com/agungsp/filament-cleave-input
Informations about the package filament-cleave-input
Filament Cleave Input
A powerful Cleave.js (using cleave-zen) input masking component for Filament v3. This package provides a native Filament-like developer experience to enforce input formatting rules, such as credit card numbers, phone numbers, dates, times, and numeral formatting. State unformatting is automatically handled before hydrating the form state to backend.
Requirements
- PHP 8.1+
- Filament v3.0+
Installation
You can install the package via composer:
Optionally, you can publish the views using:
Usage
Simply use the CleaveInput component in your Filament Forms schema.
Credit Card
Numeral Formatting
Date
Time
Custom Blocks
Available Methods
The component ships with extensive configuration methods mapped to cleave-zen's JavaScript configuration options:
Mask Types
creditCard()numeral(bool $enabled = true)date(bool $enabled = true)time(bool $enabled = true)
Numeral Options
numeralThousandsGroupStyle(\Agungsp\FilamentCleaveInput\Enums\NumeralThousandGroupStyle | string $style)numeralIntegerScale(int $scale)numeralDecimalScale(int $scale)numeralDecimalMark(string $mark)numeralPositiveOnly(bool $positiveOnly = true)stripLeadingZeroes(bool $strip = true)
Date Options
datePattern(array $pattern)dateMin(string $min)dateMax(string $max)
Time Options
timePattern(array $pattern)timeFormat(\Agungsp\FilamentCleaveInput\Enums\TimeFormat | string $format)
Generic & Custom Block Options
blocks(array $blocks)delimiter(string $delimiter)delimiters(array $delimiters)uppercase(bool $uppercase = true)lowercase(bool $lowercase = true)numericOnly(bool $numericOnly = true)cleavePrefix(string $prefix)tailPrefix(bool $tail = true)
Advanced Options
cleaveOptions(array $options): Override or inject raw JS options directly into thecleave-zenconfiguration block.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Agung Setyo Pribadi
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of filament-cleave-input with dependencies
ext-mbstring Version *
filament/forms Version ^3.0
spatie/laravel-package-tools Version ^1.15.0