<span class="block input-icon input-icon-right">
<?php
$class = [];
$error = Html::error($model, 'lname', ['tag' => 'span', 'class' => 'error']);
if (isset($error['28'])) {
$class = ['class' => 'error'];
}
?>
<?= Html::activeTextInput($model, 'lname', $class) ?>
<i class="ace-icon fa fa-user"></i>
<?= $error ?>
</span>