eluhr/yii2-password-input
最新稳定版本:1.2.1
Composer 安装命令:
composer require eluhr/yii2-password-input
包简介
Password Input for Yii2
关键字:
README 文档
README
Installation
composer require eluhr/yii2-password-input
Example usage
<?php use eluhr\passwordInput\widgets\PasswordInput; use yii\helpers\Html; use yii\widgets\ActiveForm; $form = ActiveForm::begin(); echo $form->field($model, 'password')->widget(PasswordInput::class, [ 'buttonLabelShow' => \Yii::t('password-input', 'Show'), 'buttonLabelHide' => \Yii::t('password-input', 'Hide'), 'layout' => "{input}\n{bars}\n{summary}", 'loadRulesFromModel' => false, 'rules' => [ [ 'text' => 'Must be at least 8 characters long', 'pattern' => '/[0-9a-zA-Z]{8,}/' ], [ 'text' => 'Must include at least one number', 'pattern' => '/\d+/' ], [ 'text' => 'Must contain the letter "a"', 'pattern' => '/a/', 'showAsBar' => false ], [ 'text' => 'Must not be empty', 'pattern' => '/.+/', 'showInSummary' => false ] ], 'showPasswordByDefault' => false, 'showShowPasswordButton' => true ]); echo Html::submitButton(); ActiveForm::end(); ?>
Configuration
For configuration options please refer to the Wiki
统计信息
- 总下载量: 7.1k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2022-02-17