yiisoft / yii-masked-input
Yii Framework Masked input widget Extension
Fund package maintenance!
Open Collective
yiisoft
Installs: 252
Dependents: 0
Suggesters: 0
Security: 0
Stars: 38
Watchers: 23
Forks: 13
Open Issues: 4
Requires
- php: ^7.4|^8.0
- npm-asset/inputmask: ~5.0.0
- yiisoft/yii-jquery: ^3.0@dev
Requires (Dev)
- npm-asset/jquery: *
- phan/phan: ^3.0
- phpunit/phpunit: ^9.4
- roave/infection-static-analysis-plugin: ^1.5
- spatie/phpunit-watcher: ^1.23
- vimeo/psalm: ^4.2
- yiisoft/composer-config-plugin: dev-master
- yiisoft/di: ^1.0
This package is auto-updated.
Last update: 2022-10-12 07:30:57 UTC
README
This package is deprecated.
❌
Yii Framework Masked input widget Extension
This is the Masked Input extension for Yii framework. It provides a masked input widget based on jQuery Input Mask plugin.
For license information check the LICENSE-file.
Installation
The preferred way to install this extension is through composer.
composer require --prefer-dist yiisoft/yii-masked-input
Usage
To use MaskedInput, you must set the [[mask]] property. The following example shows how to use MaskedInput to collect phone numbers:
echo MaskedInput::widget([ 'name' => 'phone', 'mask' => '999-999-9999', ]);
You can also use this widget in an [[ActiveForm]] using the [[ActiveField::widget()|widget()]] method, for example like this:
<?= $form ->field($model, 'from_date') ->widget(Yiisoft\Yii\MaskedInput\MaskedInput::class, [ 'mask' => '999-999-9999', ]) ?>