public function validatePassed($attr, $opts = [])
    {
        $params = $this->$attr;

        $missing = $invalid = $columns = [];

        /** @var BaseActiveRecord $class */
        $class = $this->modelClass;
        $pk = $class::primaryKey();
        $keys = count($pk) > 1 ? $pk : ['id'];


        foreach ($keys as $key) {

            // if no param
            if (!array_key_exists($key, $params)) {
                $missing[] = $key;

                // or param is array
            } elseif (is_array($params[$key])) {
                $invalid[] = $key;

                // all good
            } else {
                $columns[$key] = $params[$key];
            }
        }

        if (count($missing)) {
            $this->addError($attr, \Yii::t(
                Constants::MSG_CATEGORY_NAME,
                'Missing required parameters: {params}',
                ['params' => implode(', ', $missing)]
            ));
            return;
        }

        if (count($invalid)) {
            $this->addError($attr, \Yii::t(
                Constants::MSG_CATEGORY_NAME,
                'Invalid data received for parameters "{params}".',
                ['params' => implode(', ', $invalid)]
            ));
            return;
        }

        $this->_pk = $columns;
    }