summaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-11-19 10:50:03 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-11-19 10:50:03 +0000
commitd19aea9437f9abe269fed0b89cd08c640146fc6c (patch)
tree86b2c83f69bf10ed1ad3769f0cd8a3154fc7d4a8 /app/models
parent4d7dde7f4e3a6fbe48581d37c6ad50879018d6a7 (diff)
downloadredmine-d19aea9437f9abe269fed0b89cd08c640146fc6c.tar.gz
redmine-d19aea9437f9abe269fed0b89cd08c640146fc6c.zip
Don't return 2 errors when identifier is blank (blank + too short).
git-svn-id: http://svn.redmine.org/redmine/trunk@15987 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r--app/models/project.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index e751c4b4c..eecc3851e 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -72,7 +72,7 @@ class Project < ActiveRecord::Base
validates_uniqueness_of :identifier, :if => Proc.new {|p| p.identifier_changed?}
validates_length_of :name, :maximum => 255
validates_length_of :homepage, :maximum => 255
- validates_length_of :identifier, :in => 1..IDENTIFIER_MAX_LENGTH
+ validates_length_of :identifier, :maximum => IDENTIFIER_MAX_LENGTH
# downcase letters, digits, dashes but not digits only
validates_format_of :identifier, :with => /\A(?!\d+$)[a-z0-9\-_]*\z/, :if => Proc.new { |p| p.identifier_changed? }
# reserved words