diff --git a/app/models/time_entry.rb b/app/models/time_entry.rb index 4f2c561..984c2c3 100644 --- a/app/models/time_entry.rb +++ b/app/models/time_entry.rb @@ -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