Defect #16564 » 16564.diff
| app/models/repository.rb | ||
|---|---|---|
| 40 | 40 |
validates_length_of :identifier, :maximum => IDENTIFIER_MAX_LENGTH, :allow_blank => true |
| 41 | 41 |
validates_presence_of :identifier, :unless => Proc.new { |r| r.is_default? || r.set_as_default? }
|
| 42 | 42 |
validates_uniqueness_of :identifier, :scope => :project_id, :allow_blank => true |
| 43 |
validates_exclusion_of :identifier, :in => %w(show entry raw changes annotate diff show stats graph)
|
|
| 43 |
validates_exclusion_of :identifier, :in => %w(browse show entry raw changes annotate diff statistics graph revisions revision)
|
|
| 44 | 44 |
# donwcase letters, digits, dashes, underscores but not digits only |
| 45 | 45 |
validates_format_of :identifier, :with => /\A(?!\d+$)[a-z0-9\-_]*\z/, :allow_blank => true |
| 46 | 46 |
# Checks if the SCM is enabled when creating a repository |