    public function rules() {
        // NOTE: you should only define rules for those attributes that
        // will receive user inputs.
        return array(
            array ('tag', 'validateTag'),
            array('type, itemId, taggedBy, tag', 'required'),
            array('itemId, timestamp', 'numerical', 'integerOnly'=>true),
            array('type, taggedBy', 'length', 'max'=>50),
            array('tag, itemName', 'length', 'max'=>250),
            array(
                'tag', 
                'application.extensions.unique-attributes-validator.UniqueAttributesValidator', 
                'with'=>'tag,type,itemId'
            ),
            // The following rule is used by search().
            // Please remove those attributes that should not be searched.
            array('id, type, itemId, taggedBy, tag, timestamp, itemName', 'safe', 'on'=>'search'),
        );
    }
The product receives input or data, but it does
        not validate or incorrectly validates that the input has the
        properties that are required to process the data safely and
        correctly.