Using: Rails 3.0.3.
I am using this code in the validator:
validates_length_of :birth_date_8, :minimum => 8, :allow_nil => true, :message => "value_is_not_a_proper_date", :if =>:family_birthday?
It does not, however, allow the field to be nil. I have checked so it is not a matter of the :if => :family_birthday?
that is messing things up.
Is there something wrong with the code?
Try allow_blank
instead of allow_nil
:-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With