How can I validate a date that is set with select boxes on the form, so I
can raise an error when it's invalid?

The default behavior when an invalid date is entered is to add days to
arrive to a valid date. For example: if 2012-31-06 is sent to the
controller, the resulting date will be 2012-01-07

How can I stop this behavior and raise an error?

I'm using the date_select(object_name, method, options = {}, html_options =
{})method in the view.

You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 4 | next ›
Discussion Overview
grouprubyonrails-talk @
postedFeb 24, '12 at 7:39p
activeFeb 24, '12 at 9:14p

3 users in discussion

Valery Kvon: 2 posts Bob Smith: 1 post David M: 1 post



site design / logo © 2022 Grokbase