I use time_select with a prompt ("Choose hours"...) and would like to make sure, the user actually enters a valid time. But if the form is submitted without a time being selected (so with the empty prompt options selected) I don't get any errors from my validations.
My Validation:
validates :start_time, :presence => true, :allow_nil => false, :allow_blank => false
The reason is that rails turns the input from the time_select fields automatically into this date, when they are empty:
0001-01-01 00:00:00
Is there a nice way to prevent this from happening?
Thanks!