summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-01-19 10:29:06 -0800
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-01-19 10:29:06 -0800
commit3628eb84c4e50ffb73776683aabd19b37c4cd299 (patch)
treeb8136613c6d991432ff9560105d3b117831f6f10 /app
parent25da1415d385bc5d662998688c0b166b39392f29 (diff)
parent05e4af5b4c7709ab08194d109ddec8e19f44758d (diff)
downloadgitlab-ce-3628eb84c4e50ffb73776683aabd19b37c4cd299.tar.gz
Merge pull request #6072 from jvanbaarsen/fix-3516
Better check on the validity of emails
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 3691b1d1eaa..54284cc99c8 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -104,7 +104,7 @@ class User < ActiveRecord::Base
# Validations
#
validates :name, presence: true
- validates :email, presence: true, format: { with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/ }, uniqueness: true
+ validates :email, presence: true, email: {strict_mode: true}, uniqueness: true
validates :bio, length: { maximum: 255 }, allow_blank: true
validates :extern_uid, allow_blank: true, uniqueness: {scope: :provider}
validates :projects_limit, presence: true, numericality: {greater_than_or_equal_to: 0}