I have a select menu, like so
<%= f.select(:size, options_for_select(@sizes_availiable), :prompt => "Select Size") %>
With the prompt “Select Size”. The problem is, the user can choose “Select Size” and it still will allow the form to be submitted. How do I disallow the user from choose that as a value, given that all the sizes are strings as well?
There’s are a couple of things you can do:
However, you should always include validations to prevent malign users from manipulating the form and submitting random stuff.