@@ -72,7 +72,7 class Project < ActiveRecord::Base | |||||
72 | validates_uniqueness_of :identifier, :if => Proc.new {|p| p.identifier_changed?} |
|
72 | validates_uniqueness_of :identifier, :if => Proc.new {|p| p.identifier_changed?} | |
73 | validates_length_of :name, :maximum => 255 |
|
73 | validates_length_of :name, :maximum => 255 | |
74 | validates_length_of :homepage, :maximum => 255 |
|
74 | validates_length_of :homepage, :maximum => 255 | |
75 |
validates_length_of :identifier, : |
|
75 | validates_length_of :identifier, :maximum => IDENTIFIER_MAX_LENGTH | |
76 | # downcase letters, digits, dashes but not digits only |
|
76 | # downcase letters, digits, dashes but not digits only | |
77 | validates_format_of :identifier, :with => /\A(?!\d+$)[a-z0-9\-_]*\z/, :if => Proc.new { |p| p.identifier_changed? } |
|
77 | validates_format_of :identifier, :with => /\A(?!\d+$)[a-z0-9\-_]*\z/, :if => Proc.new { |p| p.identifier_changed? } | |
78 | # reserved words |
|
78 | # reserved words |
General Comments 0
You need to be logged in to leave comments.
Login now