Skip to content

JohnRomanski/ValidateEmail

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ValidateEmail

ValidateEmail gem is the ultimate email validator. It not only validates email address by Regex check but also optionally checks for the MX records.

Installation

gem install ValidateEmail

Usage

require 'rubygems'
require 'ValidateEmail'

You may validate an email address using Regex check by running:

ValidateEmail.validate("bvsatyaram@example.com")

You may also validate email address by both checking the Regex and also the MX record by running:

ValidateEmail.validate("bvsatyaram@noexisting.domain", true)

The ValidateEmail.validate method returns a boolean. So, we can have some thing as follows:

user.email = email unless ValidateEmail.validate(email)

Author

B V Satyaram <bvsatyaram.com>

About

Validate Email Rubygem

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%