Eduardo Bueno wrote:
Hello,

What is the best way to validate date periods? I have a model which has
two date attributes, and the user is not able to create a new record if
date1 is greater than date2. I tried using validates_numericality_of but
it doesn't work with dates.
  
I created my own validator for dates checking for the correct order and for valid dates.  I check valid dates by creating and catchng the exception if the date is invalid.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---



Reply via email to