diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2019-06-24 19:15:03 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2019-07-09 19:09:45 +0300 |
commit | f138acb9866fa86f16e1db14c23e48c2e9f2b38b (patch) | |
tree | 4cd1f49c4227775b47a68de597eee51dadecf3a7 /lib/gitlab/regex.rb | |
parent | 1de47ee373650f197c1e4c558946dd6d8149e7e5 (diff) |
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 'lib/gitlab/regex.rb')
-rw-r--r-- | lib/gitlab/regex.rb | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb index 7a1a2eaf6c0..e43147a3f37 100644 --- a/lib/gitlab/regex.rb +++ b/lib/gitlab/regex.rb @@ -4,14 +4,6 @@ module Gitlab module Regex extend self - def namespace_name_regex - @namespace_name_regex ||= /\A[\p{Alnum}\p{Pd}_\. ]*\z/.freeze - end - - def namespace_name_regex_message - "can contain only letters, digits, '_', '.', dash and space." - end - def project_name_regex @project_name_regex ||= /\A[\p{Alnum}\u{00A9}-\u{1f9c0}_][\p{Alnum}\p{Pd}\u{00A9}-\u{1f9c0}_\. ]*\z/.freeze end |