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

      <ul>
        <% country.errors.each do |error| %>
          <li><%= error.full_message %></li>
        <% end %>
      </ul>
    </div>
  <% end %>
  <div class="mb-3">
    <%= form.label :name, class: 'form-label' %>
    <%= form.text_field :name, class: 'form-control' %>
  </div>

  <div class="mb-3">
    <%= form.label :flag, class: 'form-label' %>
    <%= form.file_field :flag, class: 'form-control' %>
  </div>

  <div class="actions">
    <%= form.submit class: 'btn btn-primary' %>
  </div>
<% end %>