diff options
author | azul <azul@riseup.net> | 2013-09-27 00:00:31 -0700 |
---|---|---|
committer | azul <azul@riseup.net> | 2013-09-27 00:00:31 -0700 |
commit | 6b35a71db66e61c04747bf82feded014687cc528 (patch) | |
tree | fab1426f3ba181d7697443e058656774c16ff15a /users/app | |
parent | dba941539011f5e0634585e6c11a1c7f58110876 (diff) | |
parent | af9d843d646cf500306de0ad20896c05ecaccd78 (diff) |
Merge pull request #91 from jessib/feature/rollback_identity_destination_limits
Since local part of email is case sensitive, want to allow remote email ...
Diffstat (limited to 'users/app')
-rw-r--r-- | users/app/models/email.rb | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/users/app/models/email.rb b/users/app/models/email.rb index f38f2f5..a9a503f 100644 --- a/users/app/models/email.rb +++ b/users/app/models/email.rb @@ -3,16 +3,10 @@ class Email < String validates :email, :format => { - :with => /\A([^@\s]+)@((?:[-a-zA-Z0-9]+\.)+[a-zA-Z]{2,})\Z/, #checks format, but allows lowercase + :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/, #local part of email is case-sensitive, so allow uppercase letter. :message => "needs to be a valid email address" } - validates :email, - :format => { - :with => /\A[^A-Z]*\Z/, #forbids uppercase characters - :message => "letters must be lowercase" - } - def to_partial_path "emails/email" end |