<?if (count($arResult["ERRORS"]) > 0)
foreach ($arResult["ERRORS"] as $key => $error)
if (intval($key) == 0 && $key !== 0):?>
<div class="alert alert-danger" role="alert">
<?$arResult["ERRORS"][$key] = str_replace("#FIELD_NAME#", """.GetMessage("REGISTER_FIELD_".$key).""", $error);
ShowError(implode("<br />", $arResult["ERRORS"]));
?>
</div>
<?elseif($arResult["USE_EMAIL_CONFIRMATION"] === "Y"):?>
<p><?echo GetMessage("REGISTER_EMAIL_WILL_BE_SENT")?></p>
<?endif?>
Нужно, что бы каждая ошибка была в отдельном блоке alert
<div class="alert alert-danger" role="alert">
<?echo str_replace("#FIELD_NAME#", """.GetMessage("REGISTER_FIELD_".$key).""", $error);?>
</div>
if
и foreach
.<?php if (count($arResult["ERRORS"]) > 0) : ?>
<?php foreach ($arResult["ERRORS"] as $key => $error) : ?>
<?php if (intval($key) == 0 && $key !== 0) : ?>
<div class="alert alert-danger" role="alert">
<?php
$arResult["ERRORS"][$key] = str_replace("#FIELD_NAME#", """.GetMessage("REGISTER_FIELD_".$key).""", $error);
ShowError(implode("<br />", $arResult["ERRORS"]));
?>
</div>
<?php elseif ($arResult["USE_EMAIL_CONFIRMATION"] === "Y") : ?>
<p><?php echo GetMessage("REGISTER_EMAIL_WILL_BE_SENT") ?></p>
<?php endif; ?>
<?php endforeach; ?>
<?php endif ?>