Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 27724b3ccba..552a37c9533 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -116,10 +116,12 @@ class User < ActiveRecord::Base
validates :email, presence: true, email: { strict_mode: true }, uniqueness: true
validates :bio, length: { maximum: 255 }, allow_blank: true
validates :projects_limit, presence: true, numericality: { greater_than_or_equal_to: 0 }
- validates :username, presence: true, uniqueness: { case_sensitive: false },
- exclusion: { in: Gitlab::Blacklist.path },
- format: { with: Gitlab::Regex.username_regex,
- message: Gitlab::Regex.username_regex_message }
+ validates :username,
+ presence: true,
+ uniqueness: { case_sensitive: false },
+ exclusion: { in: Gitlab::Blacklist.path },
+ format: { with: Gitlab::Regex.username_regex,
+ message: Gitlab::Regex.username_regex_message }
validates :notification_level, inclusion: { in: Notification.notification_levels }, presence: true
validate :namespace_uniq, if: ->(user) { user.username_changed? }