abanoubnassem/filament-phone-field
最新稳定版本:v0.0.7
Composer 安装命令:
composer require abanoubnassem/filament-phone-field
包简介
Provides a Phone Input field for the Filament Forms, works in Admin-Panel and Forntend-Forms
关键字:
README 文档
README
A wrapper around intl-tel-input plugin for entering and validating international telephone numbers. It adds a flag dropdown to filament-forms, detects the user's country, displays a relevant placeholder and provides formatting/validation methods.
Installation
You can install the package via composer:
composer require abanoubnassem/filament-phone-field
You can publish the config file with:
php artisan vendor:publish --tag="filament-phone-field-config"
This is the Content of the published config file. Check it for more understanding of how the plugin works.
All the configurations , can be overridden by chaining the PhoneInput field.
Usage
use AbanoubNassem\FilamentPhoneField\Forms\Components\PhoneInput; // admin panel public static function form(Form $form): Form { return $form->schema([ ... PhoneInput::make('phone') // make sure to set Initial Country to null, in the admin panel // especially if you have multiple records of phone numbers from // multiple different countries. ->initialCountry(null) ->tel() ]); } //frontend-forms protected function getFormSchema(): array { return [ .... PhoneInput::make('phone') ->tel() ]; }
Changelog
Please see CHANGELOG for more information on what has changed recently.
Security Vulnerabilities
If you discover any security related issues, please create an issue.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 44.88k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 21
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-10-31