Hi,
my default value for variable mainimage_id is 0. I am trying to apply
really basic validation. If mainimage_id is 0 it should fail and if it
is > 0 it should pass the validation.
validates_numericality_of :mainimage_id, :greater_than => 1, :message =>
“Choose image.”
This will pass the validation even if the value is 0.
Thanks for your help.
P.