<%= form_with(model: dashboard_component) do |form| %>
  <% if dashboard_component.errors.any? %>
    <div style="color: red">
      <h2><%= pluralize(dashboard_component.errors.count, "error") %> prohibited this dashboard_component from being saved:</h2>

      <ul>
        <% dashboard_component.errors.each do |error| %>
          <li><%= error.full_message %></li>
        <% end %>
      </ul>
    </div>
  <% end %>

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