summaryrefslogtreecommitdiff
path: root/app/models/project.rb
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@gitlab.com>2017-04-12 09:44:05 +0200
committerBob Van Landuyt <bob@gitlab.com>2017-05-01 11:14:24 +0200
commit3143a5d2602de521b432231d701aedcc2844c088 (patch)
treefa1e4efbef26d0438437db2ef29f91cf995ed18c /app/models/project.rb
parent1498a9cb0fb4500737c9d9e88f38c0ddf2b42791 (diff)
downloadgitlab-ce-3143a5d2602de521b432231d701aedcc2844c088.tar.gz
Use the namespace validator for validating all paths
Since the namespacevalidator now knows the difference between a top-level and another path, this could all be handled there.
Diffstat (limited to 'app/models/project.rb')
-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 205b080c353..0ed4b4fddd6 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -196,7 +196,7 @@ class Project < ActiveRecord::Base
message: Gitlab::Regex.project_name_regex_message }
validates :path,
presence: true,
- project_path: true,
+ namespace: true,
length: { maximum: 255 },
format: { with: Gitlab::Regex.project_path_regex,
message: Gitlab::Regex.project_path_regex_message },