Revision #4 has been created by Orteko on Apr 18, 2011, 6:10:20 AM with the memo:
« previous (#3) next (#5) »
Create your own Validation Rule
validator, validation rules, model validation, create validator
* check if the user password is strong enough
* check the password against the pattern requested
* by the streng
* This is the 'passwordStrength' validator as declared in rules().
[...]In our rules method we used this rule on the password attribute, so the value of attribute inside our validation model will be **password**
In the rule we also setted an additional parameter named **streng
the value of that parameter will be inside the $params array
As you can see inside the method we are making a call to [CModel::addError()](http://www.yiiframework.com/doc/api/1.1/CModel#addError-detail).
Add Error accepts two parameters: the first one is the name of the attribute that you want to display the error in your form, the second one is the actual error string you want to be displayed.