Hi,
I am trying to validate the format of non-negative integers with the following
validates_format_of :fundays, :with => /\A[\d]+\Z/, :message => "invalid fundays"
And here is the form field used in the view
<%= f.text_field :fundays, :maxlength => 3, :style => 'width:50px;' %>
However, when I input a non-digit into this field and submit the form, it does not fail the validation. Instead it saves a value of 0 in the database. How do I make it write to the list of error messages.
thanks