Yiisoft\Yii\MaskedInput\MaskedInput 0 7 9 2
    Yiisoft\Yii\MaskedInput\MaskedInputAsset 1 0 3 2
CA (Afferent Coupling)
Number of unique incoming dependencies from other artifacts of the same type.
CE (Efferent Coupling)
Number of unique outgoing dependencies to other artifacts of the same type.
CID (Class Interface Size)
Number of non private methods and properties of a class: CIS = public(NOM + VARS)
Measures the size of the interface from other parts of the system to a class.
Depth of Inheritance Tree
Depth of inheritance to root class
    "name": "yiisoft/yii-masked-input",
    "description": "Yii Framework Masked input widget Extension",
    "keywords": ["yii", "masked input", "inputmask"],
    "type": "library",
    "license": "BSD-3-Clause",
    "support": {
        "issues": "https://github.com/yiisoft/yii-masked-input/issues",
        "forum": "http://www.yiiframework.com/forum/",
        "wiki": "http://www.yiiframework.com/wiki/",
        "irc": "irc://irc.freenode.net/yii",
        "source": "https://github.com/yiisoft/yii-masked-input"
    "authors": [
            "name": "Kartik Visweswaran",
            "email": "kartikv2@gmail.com"
            "name": "Alexander Makarov",
            "email": "sam@rmcreative.ru"
    "minimum-stability": "dev",
    "prefer-stable": true,
    "require": {
        "yiisoft/yii-jquery": "^3.0@dev",
        "yiisoft/yii-core": "^3.0@dev",
        "npm-asset/inputmask": "~3.3.5"
    "require-dev": {
        "phpunit/phpunit": "^7.3",
        "yiisoft/di": "^3.0@dev",
        "yiisoft/log": "dev-master",
        "yiisoft/cache": "dev-master",
        "yiisoft/yii-web": "dev-master",
        "hiqdev/composer-config-plugin": "dev-master",
        "npm-asset/jquery" : "*"
    "repositories": [
            "type": "composer",
            "url": "https://asset-packagist.org"
    "autoload": {
        "psr-4": {
            "Yiisoft\\Yii\\MaskedInput\\": "src"
    "autoload-dev": {
        "psr-4": {
            "Yiisoft\\Yii\\MaskedInput\\Tests\\": "tests"
    "extra": {
        "branch-alias": {
            "dev-master": "3.0.x-dev"
        "config-plugin": {
            "tests": "config/tests.php"
yiisoft/yii-masked-input dependencies

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.

Latest Stable Version Total Downloads Build Status


The preferred way to install this extension is through composer.

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


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',
]) ?>