summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRosemary Sanchez <rsanchez@madebyuppercut.com>2013-07-19 16:53:58 -0600
committerRosemary Sanchez <rsanchez@madebyuppercut.com>2013-07-19 16:53:58 -0600
commitd0f13438f2885d1199bf38e6f007be569ac5dcd6 (patch)
treede3a28a8c8e87b7ebedb51879fe20ad586eef7d1
parentaeed38ddf2cc66c4635f6259e31941d82c81bc1f (diff)
A blank sign up email is still an invalid email address.
-rw-r--r--app/models/sign_up.rb3
-rw-r--r--config/locales/en.yml9
2 files changed, 10 insertions, 2 deletions
diff --git a/app/models/sign_up.rb b/app/models/sign_up.rb
index 65c2eb2..faa2ab7 100644
--- a/app/models/sign_up.rb
+++ b/app/models/sign_up.rb
@@ -1,6 +1,5 @@
class SignUp < ActiveRecord::Base
VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
- validates :email, presence: true,
- format: { with: VALID_EMAIL_REGEX },
+ validates :email, format: { with: VALID_EMAIL_REGEX },
uniqueness: { case_sensitive: false }
end
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 0653957..baaaf7b 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -21,3 +21,12 @@
en:
hello: "Hello world"
+ activerecord:
+ errors:
+ models:
+ sign_up:
+ attributes:
+ email:
+ blank: The email address you submitted is invalid. Please try again.
+ invalid: The email address you submitted is invalid. Please try again.
+ taken: That email address has already been submitted. Please check your inbox for a thank you/confirmation email.