diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-08 10:59:31 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-08 10:59:31 +0000 |
commit | 147e7a8d61722e99e31cf881b3fc0b8e9c4e6a11 (patch) | |
tree | 27fa67f1a9684246ed489717195c84ba2f4e6c7b /app/models/repository.rb | |
parent | 4c6dfdf95fcb1ae4b014ea595d1f6d5bad64eb48 (diff) | |
download | redmine-147e7a8d61722e99e31cf881b3fc0b8e9c4e6a11.tar.gz redmine-147e7a8d61722e99e31cf881b3fc0b8e9c4e6a11.zip |
Use \A and \z in validation regexps.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10960 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r-- | app/models/repository.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index a8e967d0d..437b494d0 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -42,7 +42,7 @@ class Repository < ActiveRecord::Base validates_uniqueness_of :identifier, :scope => :project_id, :allow_blank => true validates_exclusion_of :identifier, :in => %w(show entry raw changes annotate diff show stats graph) # donwcase letters, digits, dashes, underscores but not digits only - validates_format_of :identifier, :with => /^(?!\d+$)[a-z0-9\-_]*$/, :allow_blank => true + validates_format_of :identifier, :with => /\A(?!\d+$)[a-z0-9\-_]*\z/, :allow_blank => true # Checks if the SCM is enabled when creating a repository validate :repo_create_validation, :on => :create |