为了从一个或者一组 model 中显示表单的概要错误,你可以使用如下方法:
Html::errorSummary($posts, ['class' => 'errors'])
为了显示单个错误:
Html::error($post, 'title', ['class' => 'error'])