1

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.

Roger
  • 3,919
  • 7
  • 30
  • 37
  • A person shouldn't even be able to select Feb 31, it shouldn't be displayed. Running into this issue myself. – Tass Mar 01 '13 at 22:09

1 Answers1

0

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

tsdbrown
  • 5,038
  • 3
  • 36
  • 40