PHPackages                             yiisoft/yii-masked-input - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. yiisoft/yii-masked-input

AbandonedArchivedLibrary[Framework](/categories/framework)

yiisoft/yii-masked-input
========================

Yii Framework Masked input widget Extension

3932811[2 issues](https://github.com/yiisoft/yii-masked-input/issues)[2 PRs](https://github.com/yiisoft/yii-masked-input/pulls)PHP

Since May 12Pushed 3y ago15 watchersCompare

[ Source](https://github.com/yiisoft/yii-masked-input)[ Packagist](https://packagist.org/packages/yiisoft/yii-masked-input)[ RSS](/packages/yiisoft-yii-masked-input/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (4)Used By (0)

  **This package is deprecated.**

 ❌

---

 [ ![](https://avatars0.githubusercontent.com/u/993323) ](https://github.com/yiisoft)

Yii Framework Masked input widget Extension
===========================================

[](#yii-framework-masked-input-widget-extension)

This is the Masked Input extension for [Yii framework](http://www.yiiframework.com). It provides a masked input widget based on [jQuery Input Mask plugin](http://robinherbots.github.io/Inputmask/).

For license information check the [LICENSE](LICENSE.md)-file.

[![Latest Stable Version](https://camo.githubusercontent.com/e1b5c6aa1dfcdfdd90e3bae6af51314a133ce4ebac36eb46bfbed32f47d55564/68747470733a2f2f706f7365722e707567782e6f72672f796969736f66742f7969692d6d61736b65642d696e7075742f762f737461626c652e706e67)](https://packagist.org/packages/yiisoft/yii-masked-input)[![Total Downloads](https://camo.githubusercontent.com/f64ed3e990fb2a4dc7d106b7967e5d3a38647900ab08f25656fc4b4550b94caa/68747470733a2f2f706f7365722e707567782e6f72672f796969736f66742f7969692d6d61736b65642d696e7075742f646f776e6c6f6164732e706e67)](https://packagist.org/packages/yiisoft/yii-masked-input)[![Build Status](https://camo.githubusercontent.com/73d01032c8496f322acc42823cd89a8221ac5a965a62a2c60ad38f2e3a49be10/68747470733a2f2f7472617669732d63692e636f6d2f796969736f66742f7969692d6d61736b65642d696e7075742e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/yiisoft/yii-masked-input)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

```
composer require --prefer-dist yiisoft/yii-masked-input

```

Usage
-----

[](#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:

```
