public function afterValidate() { parent::afterValidate(); $this->variant_ids = (array) $this->variant_ids; }