How to implement password strength like in gmail registration in YII php?
Asked Answered
L

2

7

I want to create Password Strength Meter.I am following the estrongpassword For YII I used Estrongpassword extension. I put this extension in extension folder and wrote the code as 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 its thorughs me ERROR as written below:

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

I wondering how to configure it,please help me. Thanks in advance.

Lattie answered 18/7, 2013 at 7:46 Comment(0)
C
1

The code is correct and shouldn't cause any problems. Here are a few things you can try:

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

The file should be at:

protected/extensions/EStrongPassword/EStrongPassword.php

Hope this helps!

Clearing answered 18/7, 2013 at 8:5 Comment(2)
Can you provide me steps to install extension as i am new to YII may be i am not installing the extension correctly.Lattie
Please follow the steps in the documentation for installing Yii Extensions. Once you've set up the extension, read my answer again.Clearing
R
0

I was researching another problem when I came across this, perhaps it could help you. It is a guide on 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/

Risorgimento answered 18/7, 2013 at 14:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.