<?php if ($showError && isset($errors) && $errors->hasBag($errorBag)) : ?>
    <?php foreach ($errors->getBag($errorBag)->get($nameKey) as $err) : ?>
    <div class="col-sm-9 col-sm-offset-3 p-1">
        <div <?= $options['errorAttrs'] ?>><?= $err ?></div>
    </div>
    <?php endforeach; ?>
<?php endif; ?>

