when invalidating a status change, where does the message go to?
cornernote opened this issue · comments
CoRNeRNoTe commented
I have the following event:
public static function beforeEnterProduction($event)
{
/** @var \app\models\Job $job */
$job = $event->sender->owner;
if ($job->company->status == 'company/suspended') {
$message = Yii::t('app', 'Cannot change Status to Production, the company is suspended.');
$event->invalidate($message);
}
}
I would like to output this message somewhere, but I can't seem to find where it goes.
CoRNeRNoTe commented
Oh, nevermind, it goes into the model's errors. I didn't see it because I was redirecting.