<% if (errors && errors.length) { %>
<% for (var i = 0; i < errors.length; i++) { %> <%= errors[i] %> <% } %>
<% } %>