public function beforeValidate()
    {
        /* @var $model ActiveRecord */
        $model = $this->owner;
        foreach ($this->attributes as $attr => $options) {
            $this->ensureAttributes($attr, $options);
            if ($file = UploadedFile::getInstance($model, $attr)) {
                $model->{$attr} = $file;
            }
        }
    }
public function beforeValidate()
    {
        /* @var $model ActiveRecord */
        $model = $this->owner;
        foreach ($this->attributes as $attr => $options) {
            $this->ensureAttributes($attr, $options);
            if ($file = UploadedFile::getInstance($model, $attr)) {
                $model->{$attr} = $file;
            }
        }
    }
public function beforeValidate ( ) { /* @var $model ActiveRecord */ $ model = $ this -> owner ; foreach ( $ this -> attributes as $ attr => $ options ) { $ this -> ensureAttributes ( $ attr , $ options ) ; if ( $ file = UploadedFile :: getInstance ( $ model , $ attr ) ) { $ model -> { $ attr } = $ file ; } } }
function for EVENT_BEFORE_VALIDATE
function for EVENT_BEFORE_VALIDATE