diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-01-19 10:29:06 -0800 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-01-19 10:29:06 -0800 |
commit | 3628eb84c4e50ffb73776683aabd19b37c4cd299 (patch) | |
tree | b8136613c6d991432ff9560105d3b117831f6f10 /app | |
parent | 25da1415d385bc5d662998688c0b166b39392f29 (diff) | |
parent | 05e4af5b4c7709ab08194d109ddec8e19f44758d (diff) | |
download | gitlab-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.rb | 2 |
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} |