Difference between #6 and #9 of
Create your own Validation Rule

Changes

Title unchanged

Create your own Validation Rule

Category unchanged

How-tos

Yii version unchanged

Tags unchanged

validator, validation rules, model validation, create validator

Content changed

[...]
* Validates the attribute of the object.
* If there is any error, the error message is added to the object.
* @param CModel $object the object being validated
* @param string $attribute the attribute being validated
*/
protected function validateAttribute(
CModel $object,$attribute)
{
// check the strength parameter used in the validation rule of our model
[...]
);
}
```

 
 
##Links
 
* Russian version [The PHP Times](http://phptime.ru/blog/yii/27.html)
59 0
54 followers
Viewed: 273 067 times
Version: 1.1
Category: How-tos
Written by: nickcv
Last updated by: Gismo
Created on: Mar 31, 2011
Last updated: 11 years ago
Update Article

Revisions

View all history