Revision #4 was created by Orteko on Apr 18, 2011, 6:10:20 AM.
fix typos
Content
[...]
```php
/**
* check if the user password is strong enough
* check the password against the pattern requested
* by the strenghth parameter
* 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 **strenghth**
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.