diff --git a/README.rdoc b/README.rdoc index 4ac1ada..8c61902 100644 --- a/README.rdoc +++ b/README.rdoc @@ -74,6 +74,10 @@ the valid range of dates or times allowed :if - Execute validation when :if evaluates true :unless - Execute validation when :unless evaluates false + Special options: + :with_time - Validate a date attribute value combined with a time value against any temporal restrictions + :with_date - Validate a time attribute value combined with a date value against any temporal restrictions + Message options: - Use these to override the default error messages :invalid_date_message :invalid_time_message @@ -107,6 +111,8 @@ values are compared as dates. :allow_nil => true validates_datetime :appointment_date, :before => Proc.new { 1.week.from_now } + + validates_date :entry_date, :with_time => '17:00', :on_or_before => :competition_closing === DATE/TIME FORMATS: diff --git a/TODO b/TODO index c85ebe7..3e79475 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,3 @@ - :format option -- :with_date and :with_time options - valid formats could come from locale file - add replace_formats instead add_formats :before