diff options
Diffstat (limited to 'users/app/models')
-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 |