Socket
Book a DemoInstallSign in
Socket

ValidateEmail

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ValidateEmail

bundlerRubygems
Version
1.0.1
Version published
Maintainers
1
Created
Source

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>

FAQs

Package last updated on 12 Jun 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts