Ruby on Rails
EmailVeracity (Version #2)

Description

The Email Veracity Plugin adds a validation function that you can use in models that have email attributes. It will validate email addresses three ways:

  1. Checks that the email address is well-formed
  2. Checks that the domain name in the email address is real
  3. Checks that the DNS entry for the domain has an MX record

Author

Carsten Nielsen of Savvica.

Installation

script/plugin install <a href="http://svn.savvica.com/public/plugins/validates_email_veracity_of">http://svn.savvica.com/public/plugins/validates_email_veracity_of</a>

Usage

Standard:

validates_email_veracity_of :email

Disable domain name lookup:

validates_email_veracity_of :email, :domain_lookup => false

Custom Error Message:

validates_email_veracity_of :email, :message => 'is not correct at all.'

Custom DNS timeout (the default is 2 seconds):

validates_email_veracity_of :email, :timeout => 1 # => Time in seconds.

Description

The Email Veracity Plugin adds a validation function that you can use in models that have email attributes. It will validate email addresses three ways:

  1. Checks that the email address is well-formed
  2. Checks that the domain name in the email address is real
  3. Checks that the DNS entry for the domain has an MX record

Author

Carsten Nielsen of Savvica.

Installation

script/plugin install <a href="http://svn.savvica.com/public/plugins/validates_email_veracity_of">http://svn.savvica.com/public/plugins/validates_email_veracity_of</a>

Usage

Standard:

validates_email_veracity_of :email

Disable domain name lookup:

validates_email_veracity_of :email, :domain_lookup => false

Custom Error Message:

validates_email_veracity_of :email, :message => 'is not correct at all.'

Custom DNS timeout (the default is 2 seconds):

validates_email_veracity_of :email, :timeout => 1 # => Time in seconds.