summaryrefslogtreecommitdiff
path: root/app/validators
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2019-06-24 18:15:03 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2019-07-09 18:09:45 +0200
commitf138acb9866fa86f16e1db14c23e48c2e9f2b38b (patch)
tree4cd1f49c4227775b47a68de597eee51dadecf3a7 /app/validators
parent1de47ee373650f197c1e4c558946dd6d8149e7e5 (diff)
downloadgitlab-ce-f138acb9866fa86f16e1db14c23e48c2e9f2b38b.tar.gz
Lesser Namespace#name validations
Since we use `Namespace#path` to build routes and URLs we can lessen the restrictions on `Namespace#name` so it can accomodate a user's name.
Diffstat (limited to 'app/validators')
-rw-r--r--app/validators/namespace_name_validator.rb12
1 files changed, 0 insertions, 12 deletions
diff --git a/app/validators/namespace_name_validator.rb b/app/validators/namespace_name_validator.rb
deleted file mode 100644
index fb1c241037c..00000000000
--- a/app/validators/namespace_name_validator.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-# frozen_string_literal: true
-
-# NamespaceNameValidator
-#
-# Custom validator for GitLab namespace name strings.
-class NamespaceNameValidator < ActiveModel::EachValidator
- def validate_each(record, attribute, value)
- unless value =~ Gitlab::Regex.namespace_name_regex
- record.errors.add(attribute, Gitlab::Regex.namespace_name_regex_message)
- end
- end
-end