Password Strength Validator

This is my first yii extension. On project that I worked, I had to validate if user password is strong, and for this purpose, I developed extension, that I can use in other project too. Extension is pretty simple.

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.

To install this extension, simply unzip the contents of the zip file into your protected/extensions/validators folder, and add following code to your model class whose password attribute you want to validate:




//rules method in your model class

public function rules()

	{

		return array(			

            array('password','ext.validators.EPasswordStrength', 'min'=>7),

		);

	}



Looks good, will review after implementation.

You may add your ext to Yii Extension Library : http://www.yiiframework.com/ext/create/

I just added extension to library:

http://www.yiiframework.com/extension/epasswordstrength/

Many thanks,

I looking for with spl charter and password should not have a first name and last name