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
path: root/app
diff options
context:
space:
mode:
authorAndreas Brandl <abrandl@gitlab.com>2019-04-05 14:29:19 +0300
committerAndreas Brandl <abrandl@gitlab.com>2019-04-05 14:29:19 +0300
commit30fa3cbdb74df2dfeebb2929a10dd301a0dde55e (patch)
tree72b5a7d8d615475ea2b8afabbfcebe1402c96d52 /app
parent14cf8bf050896d617761e7947f81c8e23364a48b (diff)
parentebfe19e8e7690598f86facc0bb18df4052468fc0 (diff)
Merge branch '57493-add-limit-to-user-name' into 'master'
Add a length limit of 128 char to the user name field See merge request gitlab-org/gitlab-ce!26146
Diffstat (limited to 'app')
-rw-r--r--app/models/user.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index b426d100537..259889995d3 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -159,7 +159,7 @@ class User < ApplicationRecord
# Validations
#
# Note: devise :validatable above adds validations for :email and :password
- validates :name, presence: true
+ validates :name, presence: true, length: { maximum: 128 }
validates :email, confirmation: true
validates :notification_email, presence: true
validates :notification_email, devise_email: true, if: ->(user) { user.notification_email != user.email }