--- time_entry_orig.rb 2013-11-14 15:25:09.195440648 +0200 +++ time_entry.rb 2013-11-14 15:25:27.135231459 +0200 @@ -85,6 +85,7 @@ errors.add :hours, :invalid if hours && (hours < 0 || hours >= 1000) errors.add :project_id, :invalid if project.nil? errors.add :issue_id, :invalid if (issue_id && !issue) || (issue && project!=issue.project) + errors.add :spent_on, "is too early" if (spent_on < Date.today - 5.day) end def hours=(h)