How to realize the power of a password, like in gmail registration in YII php?

I want to create a password strength label. I follow estrongpassword For YII I used the Estrongpassword extension. I placed this extension in the extension folder and wrote the code as shown below:

<div class="row"> <?php echo $form->labelEx($model,'password'); ?> <?php $this->widget('ext.EStrongPassword.EStrongPassword', array('form'=>$form, 'model'=>$model, 'attribute'=>'password')); ?> <?php echo $form->error($model,'password'); ?> 

when I checked my file, it hurts me ERROR, as follows:

 Alias "ext.EStrongPassword.EStrongPassword" is invalid. Make sure it points to an existing PHP file and the file is readable. 

I am wondering how to set it up, please help me. Thanks in advance.

+7
php passwords yii yii-extensions
source share
2 answers

The code is correct and should not cause any problems. Here are a few things you can try:

  • Make sure you have installed the extension correctly.
  • Check the spelling of the file names and class name. Linux is case sensitive.
  • Check the protected/extensions folder and make sure that the EStrongPassword directory EStrongPassword (case sensitive)
  • Make sure the path is correct ( ext in your script refers to the protected/extensions path)

The file should be:

 protected/extensions/EStrongPassword/EStrongPassword.php 

Hope this helps!

+1
source share

I was exploring another issue when I came across this, maybe this could help you. This is a guide to custom validation rules, but it uses exactly what you are looking for as an example ...

http://www.yiiframework.com/wiki/168/create-your-own-validation-rule/

0
source share

All Articles