src/models/ShopOrder.php
public function validateCanceled($attribute)
    {
        if ($this->canceled_at && !$this->reason_canceled) {
            $this->addError($attribute, \Yii::t('skeeks/shop/app', 'Enter the reason for cancellation'));
        }
    }
public function validateCanceled($attribute)
    {
        if ($this->canceled_at && !$this->reason_canceled) {
            $this->addError($attribute, \Yii::t('skeeks/shop/app', 'Enter the reason for cancellation'));
        }
    }
Валидация причины отмены

@param $attribute