PHPackages                             raoul2000/yii2-twbsmaxlength-widget - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. raoul2000/yii2-twbsmaxlength-widget

ActiveYii2-extension[Validation &amp; Sanitization](/categories/validation)

raoul2000/yii2-twbsmaxlength-widget
===================================

The TwbsMaxlength widget is a wrapper for the Bootstrap Maxlength plugin, a visual feedback indicator for the maxlength attribute.

1.1.1(9y ago)28.2k↓50%5[1 PRs](https://github.com/raoul2000/yii2-twbsmaxlength-widget/pulls)BSD-3-ClausePHP

Since Feb 12Pushed 8y ago2 watchersCompare

[ Source](https://github.com/raoul2000/yii2-twbsmaxlength-widget)[ Packagist](https://packagist.org/packages/raoul2000/yii2-twbsmaxlength-widget)[ RSS](/packages/raoul2000-yii2-twbsmaxlength-widget/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

yii2-twbsmaxlength-widget
=========================

[](#yii2-twbsmaxlength-widget)

The **TwbsMaxlength** widget is a wrapper for the great [Bootstrap Maxlength plugin](http://mimo84.github.io/bootstrap-maxlength/), a visual feedback indicator for the *maxlength* attribute. Have a look to the [demo page](http://mimo84.github.io/bootstrap-maxlength/) for more !

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist raoul2000/yii2-twbsmaxlength-widget "*"

```

or add

```
"raoul2000/yii2-twbsmaxlength-widget": "*"

```

to the require section of your `composer.json` file.

Basic Usage
-----------

[](#basic-usage)

Using *TwbsMaxlength* widget is easy. In the example below, we are attaching the "Bootstrap Maxlength" plugin to an input text control, with a maximum length of 20 characters set by the **maxlength** HTML5 attribute :

```
