I’m trying to make a simple custom validation message. The validation I’m using compiles and runs fine, but I don’t see any change in the message:
validates :rating, :inclusion => { :in => 0..5 }, :presence => { :message => " must be within 0-5" }
The message I get is still Rating is not included in the list
I need to validate that rating is present and is a decimal between 0-5
Alright, I solved it. This is the validation that works:
and I added this
validates :rating, :numericality => { :message => " should be a number" }