diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-01-04 17:44:10 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-01-04 17:44:10 +0300 |
commit | ce4258e991b6db0e400538bccf21ea10c4bc7b3a (patch) | |
tree | 2350bbe22adae6c36f8e5ec67871a0dfe56b9f10 /app/models | |
parent | 71a692c16db2aacd1dcbb55542e64ee269939feb (diff) | |
parent | 33b41bc8a821974d07d01ffdee98db35d1df4840 (diff) |
Merge branch 'add_email_password_confirmation' into 'master'
Add email confirmation field to registration form
Closes #3053
See merge request !7432
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/user.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index e719c52836a..66a768d54bb 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -99,6 +99,7 @@ class User < ActiveRecord::Base # # Note: devise :validatable above adds validations for :email and :password validates :name, presence: true + validates_confirmation_of :email validates :notification_email, presence: true validates :notification_email, email: true, if: ->(user) { user.notification_email != user.email } validates :public_email, presence: true, uniqueness: true, email: true, allow_blank: true |