Merged r11472 from trunk (#3107).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.3-stable@11562 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2013-03-09 09:11:44 +00:00
parent fe3a4cdbd1
commit a18db94c06
2 changed files with 8 additions and 0 deletions
+1
View File
@@ -40,6 +40,7 @@ class TimeEntry < ActiveRecord::Base
validates_presence_of :user_id, :activity_id, :project_id, :hours, :spent_on
validates_numericality_of :hours, :allow_nil => true, :message => :invalid
validates_length_of :comments, :maximum => 255, :allow_nil => true
validates :spent_on, :date => true
before_validation :set_project_if_nil
validate :validate_time_entry