search for: validate_date

Displaying 1 result from an estimated 1 matches for "validate_date".

Did you mean: validates_date
2005 Dec 02
1
undefined local variable or method `errors' for Listing:Clas
I have a listing model in which I''m trying to validate a date (2005, 2, 29 - is not a valid date). def self.validate_date(year, month, day) unless Date::valid_date?(year.to_i, month.to_i, day.to_i) errors.add(:start_date, "De startdatum moet geldige datum zijn.") end end But everytime I call this code I get: undefined local variable or method `errors'' for Listing:Class Looking on...