lib/email_detected.rb in email_detected-0.1.0 vs lib/email_detected.rb in email_detected-0.1.1

- old
+ new

@@ -8,10 +8,10 @@ VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-]+(\.[a-z\d\-]+)*\.[a-z]+\z/i def self.exist?(email) return true if config.test_mode - return { status: false, errors: ['The email address invalid.'] } unless email.match VALID_EMAIL_REGEX + return { status: false, message: 'The email address invalid.' } unless email.match VALID_EMAIL_REGEX email_detected = EmailDetected::Checker.run(email) if email_detected.invalid? resp = { status: false, message: email_detected.errors.first } else resp = { status: true, message: 'The email address has already been registered.' }