epasswordstrength

Validates password strength
12 followers

This validator checks if password is strong enough. Password is strong enough, if it have defined minimum number of characters(which can be changed), and if it contain at least one upper case letter, at least one lower case letter, and at least one number.

Requirements

Class is developed and tested using Yii version 1.1.7

Usage

Unzip the contents of the zip file onto your protected/extensions/validators folder, then edit rules method of the model class as following:

public function rules()
{ 
   return array(
     array(array('password','ext.validators.EPasswordStrength', 'min'=>7),
    );
 
}

Resources

Change Log

0.1

  • Initial release

Total 1 comment

#9903 report it
Lothor at 2012/09/20 10:41am
Update Sample
public function rules()
{ 
   return array(
      array('password', 'ext.validators.EPasswordStrength', 'min' => 7, 'message' => Yii::t('category', 'Error Message')),
   );
 
}

Leave a comment

Please to leave your comment.

Create extension