<%= form_with(model: batch) do |form| %> <% if batch.errors.any? %>

<%= pluralize(batch.errors.count, "error") %> prohibited this batch from being saved:

<% end %>
<%= form.submit %>
<% end %>