I want to validate a date in my model in Ruby on Rails, however, the day, month and year values are already converted into an incorrect date by the time they reach my model.
For example, if I enter February 31st 2009 in my view, when I use Model.new(params[:model]) in my controller, it converts it to "March 3rd 2009", which my model then sees as a valid date, which it is, but it is incorrect.
I would like to be able to do this validation in my model. Is there any way that I can, or am I going about this completely wrong?
I found this "Date validation" that discusses the problem but it never was resolved.