$value) { $m->$attribute = $value; } return $m; } public function rules() { return [ [['val_attr_a', 'val_attr_b'], 'required', 'on' => 'reqTest'], [['val_attr_c'], 'integer'], ]; } public function inlineVal($attribute, $params = []) { return true; } public function __get($name) { if (stripos($name, 'attr') === 0) { return isset($this->attr[$name]) ? $this->attr[$name] : null; } return parent::__get($name); } public function __set($name, $value) { if (stripos($name, 'attr') === 0) { $this->attr[$name] = $value; } else { parent::__set($name, $value); } } public function getAttributeLabel($attr) { return $attr; } }