I am working on a Rails project and have implemented radio_button_tag. How can I add a validation to ensure that an option is chosen before submitting the form?
<% @votes.each do |vote| %>
<%= radio_button_tag "choice", "#{vote.id}" %>
<% end %>
Any suggestions on how to achieve this?