Validates Email Veracity Of
= Validates Email Veracity Of
Author:: Carsten Nielsen (mailto:carsten.nielsen@savvica.com)
License:: MIT
Validates an email address for well-formedness and verifies it’s domain by checking if there are
any mail servers associated with it.
Options
- message
- Changes the default error message.
- domain_check
- Skips domain MX lookup unless true.
- timeout
- Time (in seconds) before the domain lookup is skipped. Default is 2.
- fail_on_timeout
- Causes validation to fail if a timeout occurs.
- timeout_message
- Changes the default timeout error message.
Examples
- validates_email_veracity_of :email_address, :message => ‘is not correct.’
– Changes the default error message from ‘is invalid.’ to ‘is not correct.’
- validates_email_veracity_of :email, :domain_check => false
– Domain MX lookup is skipped.
- validates_email_veracity_of :email, :timeout => 0.5
– Causes the domain lookup to timeout if it does not complete within half a second.
- validates_email_veracity_of :email, :fail_on_timeout => true, :timeout_message => ‘is invalid.’
– Causes the validation to fail on timeout and changes the error message to ‘is invalid.’
to obfuscate it.
== Running The Tests
- You will need to be connected to the internet to utilize the remote features.
– > rake test
NOTE: This description has been extracted from the Plugin README and so the formatting may need updating to make browser friendly