ValidateEmail 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  module Validateemail
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/ValidateEmail.rb CHANGED
@@ -4,7 +4,7 @@ module ValidateEmail
4
4
  def self.validate(email, validate_mx = false)
5
5
  email_pattern = (email =~ /^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/)
6
6
  is_valid = email_pattern.nil? ? false : true
7
- is_valid = is_valid && validate_mx_record(email) if validate_mx
7
+ is_valid = validate_mx_record(email) if is_valid && validate_mx
8
8
 
9
9
  return is_valid
10
10
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 2
9
- version: 0.0.2
8
+ - 3
9
+ version: 0.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Satyaram B V