Socket
Book a DemoInstallSign in
Socket

email_valid

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

email_valid

0.0.1
bundlerRubygems
Version published
Maintainers
1
Created
Source

=Email::Valid

Email::Valid is a simple class to check the validity of email addresses, copied from the perl Email::Valid module.

==Quick Start

if Email::Valid.address(email_address) # do something end

==Usage

Call the class method:

if Email::Valid.address(email_address) # do something end

or the instance methods:

email = Email::Valid.new(:check_domain => true, :check_rfc822 => true)

if email.valid(email_address) # do something else raise "Invalid Email: #{email.errors.join ', '}" end

Possible arguments to Email::Valid.new

:check_domain - checks the mx record for the domain, default true

:check_rfc822 - checks the address against the rfc822 pattern, default true

Other instance methods:

valid_domain(email) - returns true if it finds a valid mx record, false otherwise

valid_rfc822(email) - returns true if it matches the rfc822 pattern, false otherwise

==Credit

This is an incomplete adaptation of the perl Email::Valid module.

http://search.cpan.org/~rjbs/Email-Valid-0.184/lib/Email/Valid.pm

FAQs

Package last updated on 30 Apr 2011

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.