added 999 as a maximum for time entry hours

git-svn-id: http://redmine.rubyforge.org/svn/trunk@369 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2007-03-23 13:11:47 +00:00
parent 8d54d97007
commit 76d4ac17a2
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ class TimeEntry < ActiveRecord::Base
end
def validate
errors.add :hours, :activerecord_error_invalid if hours && hours < 0
errors.add :hours, :activerecord_error_invalid if hours && (hours < 0 || hours >= 1000)
errors.add :project_id, :activerecord_error_invalid if project.nil?
errors.add :issue_id, :activerecord_error_invalid if (issue_id && !issue) || (issue && project!=issue.project)
end