summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2016-11-25 18:18:45 +0000
committerAlfredo Sumaran <alfredo@gitlab.com>2016-11-25 18:18:45 +0000
commit83ef7c08f373c5a96532ecc16a9200eeaa8f0631 (patch)
treedf76e2020d1b77b25f9cb76801fd97377d5bc37f
parente17328986abcaabff47edb6292ede7546f607bb2 (diff)
parent117a078cbb22ab3890e519655fde2b2c314c6b46 (diff)
downloadgitlab-ce-83ef7c08f373c5a96532ecc16a9200eeaa8f0631.tar.gz
Merge branch '24903-allow-groups-with-special-characters' into 'master'
Allow dots in group names to pass validation for Create Group and Edit Group forms ## What does this MR do? Allows dots within group names to pass form validation when creating or editing a group. ## Are there points in the code the reviewer needs to double check? Nope, pretty straight forward. ## Why was this MR needed? Although group names with dots are allowed, our frontend validation mistakenly invalidates them ## Screenshots (if relevant) #### Before: ![Screen_Shot_2016-11-23_at_4.55.03_PM](/uploads/006ee5f694de1c98e0df0b0ccd3807ee/Screen_Shot_2016-11-23_at_4.55.03_PM.png) #### After: ![Screen_Shot_2016-11-23_at_4.52.42_PM](/uploads/693f112fb309005b0df714b32c99f25e/Screen_Shot_2016-11-23_at_4.52.42_PM.png) ![Screen_Shot_2016-11-23_at_4.51.53_PM](/uploads/7bdb5fca92995d18a7f38d9150eb260c/Screen_Shot_2016-11-23_at_4.51.53_PM.png) ## Does this MR meet the acceptance criteria? - [ ] ~~[Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added~~ - [ ] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - [ ] ~~API support added~~ - Tests - [ ] Added for this feature/bug - [ ] All builds are passing - [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if it does - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? Related to: #24622 Closes #24903 See merge request !7723
-rw-r--r--app/views/shared/_group_form.html.haml5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/views/shared/_group_form.html.haml b/app/views/shared/_group_form.html.haml
index ba25e09d638..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