<% if (messages.errors) { %>
    <div class="row mt-3">
        <div class="alert alert-danger alert-dismissible fade show" role="alert">
            <ul>
                <% messages.errors.forEach(function(error) { %>
                    <li>
                        <%= error.msg %>
                    </li>
                <% }) %>
            </ul>
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                <span aria-hidden="true">&times;</span>
            </button>
        </div>
    </div>
<% } %>

<% if (success.length > 0) { %>
    <div class="row mt-3">
        <div class="alert alert-success alert-dismissible fade show" role="alert">
            <ul>
                <% success.forEach(function(error) { %>
                    <li>
                        <%= error.msg %>
                    </li>
                <% }) %>
            </ul>
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                <span aria-hidden="true">&times;</span>
            </button>
        </div>
    </div>
<% } %>

<% if (messages.error) { %>
    <div class="row mt-3">
        <div class="alert alert-danger alert-dismissible fade show" role="alert">
            <%= messages.error %>
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                <span aria-hidden="true">&times;</span>
            </button>
        </div>
    </div>
<% } %>
