diff --git a/src/BaseHtml.php b/src/BaseHtml.php index d01e1b4..fba0fff 100644 --- a/src/BaseHtml.php +++ b/src/BaseHtml.php @@ -145,7 +145,9 @@ abstract class BaseHtml extends \yii\helpers\Html */ public static function error($model, $attribute, $options = []): string { - static::addCssClass($options, 'invalid-feedback'); + if (!array_key_exists('class', $options)) { + $options['class'] = ['invalid-feedback']; + } return parent::error($model, $attribute, $options); }