Date validation in Rails

I have an Active Record model that contains two attributes: start_date and end_date. How do I go about validating the following:

  1. The dates are in the correct (yyyy-mm-dd) format
  2. That end_date > start_date
7
задан Kevin Pang 14 April 2011 в 14:56
поделиться