I am using rails 2.3.4 . In the datetime_select helper if I select Feb 31 then I do not get any validation error. That is just wrong.
What is the best way to intercept the parameters and to present to user that there is validation error.
I am using rails 2.3.4 . In the datetime_select helper if I select Feb 31 then I do not get any validation error. That is just wrong.
What is the best way to intercept the parameters and to present to user that there is validation error.
It is not wrong unless you add the validation to your models. The helper is just a view helper.
Validating dates can be quite complicated to write yourself. I use this plug-in to help take care of it: http://github.com/smtlaissezfaire/validates_date_time