protected function getFilterError() { $model = $this->grid->filterModel; if ($model->hasErrors($this->attribute)) { Html::addCssClass($this->filterOptions, 'has-error'); return ' ' . Html::error($model, $this->attribute, $this->grid->filterErrorOptions); } else { return ''; } }