From 6a23fb305f830735b601d0362d4cf881ddc08629 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Wed, 23 Nov 2016 16:48:51 -0600 Subject: allow "." in group name validation regex --- app/views/shared/_group_form.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/_group_form.html.haml b/app/views/shared/_group_form.html.haml index ba25e09d638..fc1753ca082 100644 --- a/app/views/shared/_group_form.html.haml +++ b/app/views/shared/_group_form.html.haml @@ -13,7 +13,7 @@ .input-group-addon = root_url = f.text_field :path, placeholder: 'open-source', class: 'form-control', - autofocus: local_assigns[:autofocus] || false, pattern: "[a-zA-Z0-9-_]+", + autofocus: local_assigns[:autofocus] || false, pattern: "[a-zA-Z0-9-_\\.]+", required: true, title: 'Please choose a group name with no special characters.' - if @group.persisted? -- cgit v1.2.1 From 117a078cbb22ab3890e519655fde2b2c314c6b46 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Fri, 25 Nov 2016 10:35:25 -0600 Subject: use standard gitlab namespace regex for group name validation --- app/views/shared/_group_form.html.haml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/shared/_group_form.html.haml b/app/views/shared/_group_form.html.haml index fc1753ca082..0bc851b4256 100644 --- a/app/views/shared/_group_form.html.haml +++ b/app/views/shared/_group_form.html.haml @@ -13,8 +13,9 @@ .input-group-addon = root_url = f.text_field :path, placeholder: 'open-source', class: 'form-control', - autofocus: local_assigns[:autofocus] || false, pattern: "[a-zA-Z0-9-_\\.]+", - required: true, title: 'Please choose a group name with no special characters.' + autofocus: local_assigns[:autofocus] || false, required: true, + pattern: Gitlab::Regex::NAMESPACE_REGEX_STR_SIMPLE, + title: 'Please choose a group name with no special characters.' - if @group.persisted? .alert.alert-warning.prepend-top-10 -- cgit v1.2.1