diff options
author | Andreas Brandl <abrandl@gitlab.com> | 2019-04-05 14:29:19 +0300 |
---|---|---|
committer | Andreas Brandl <abrandl@gitlab.com> | 2019-04-05 14:29:19 +0300 |
commit | 30fa3cbdb74df2dfeebb2929a10dd301a0dde55e (patch) | |
tree | 72b5a7d8d615475ea2b8afabbfcebe1402c96d52 /app | |
parent | 14cf8bf050896d617761e7947f81c8e23364a48b (diff) | |
parent | ebfe19e8e7690598f86facc0bb18df4052468fc0 (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.rb | 2 |
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 } |