summaryrefslogtreecommitdiff
path: root/app/models/namespace.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-02 09:57:14 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-02 09:57:14 +0300
commitd35a99e6cbeaf8d5800378f61d417f34b20620ca (patch)
tree80bb4fe7dfc9ebb81cfc55b22c4e3ca887518a24 /app/models/namespace.rb
parentf3b31c4c5bdf2470ee6625f01cd4741cdb319345 (diff)
parentb1c40e81510ccccc5e93a82d2f5b819d6dea69e5 (diff)
downloadgitlab-ce-d35a99e6cbeaf8d5800378f61d417f34b20620ca.tar.gz
Merge pull request #7204 from cirosantilli/user-validation-msg
Fix username validation message to match regexp.
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r--app/models/namespace.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb
index cd58710825d..b19b72906e7 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -23,12 +23,12 @@ class Namespace < ActiveRecord::Base
validates :name, presence: true, uniqueness: true,
length: { within: 0..255 },
format: { with: Gitlab::Regex.name_regex,
- message: "only letters, digits, spaces & '_' '-' '.' allowed." }
+ message: Gitlab::Regex.name_regex_message }
validates :description, length: { within: 0..255 }
validates :path, uniqueness: { case_sensitive: false }, presence: true, length: { within: 1..255 },
exclusion: { in: Gitlab::Blacklist.path },
format: { with: Gitlab::Regex.path_regex,
- message: "only letters, digits & '_' '-' '.' allowed. Letter should be first" }
+ message: Gitlab::Regex.path_regex_message }
delegate :name, to: :owner, allow_nil: true, prefix: true