Enforcing "You must agree" requirements in forms

Comparing #2 with #3

Content

[...]
* I agree that Yii is the best MVC framework ever
* I am over 18 years of age

In this case, the checkbox (implemented in the usual way in a form) warrants a validator that enforces this condition, and it can be done with the built-in `compare` validator along with a custom message:

Here, the model's `iagree` attribute
 (which could be named anything as your database or form dictate) can be attached to a form, and validation will be applied to it:

```php
class SomeModel extends CActiveRecord {
...
public function rules()
[...]