Socket
Book a DemoInstallSign in
Socket

throwaway

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

throwaway

1.1.2
bundlerRubygems
Version published
Maintainers
1
Created
Source

Throwaway

This is a very simple Ruby gem which validates that email addresses are not from a disposable email address provider. The list of providers is simply hardcoded, so no network time is required. I'll try and keep it up to date, but such an endeavour is pretty impossible. Catching the most common providers does help with fraud prevention etc though.

Usage

Query

Throwaway.is_throwaway?(email)
=> true/false

Validator

validates :email, :throwaway => false

Default message: is from a disposable email provider

validates :email, :throwaway => false, :message => "emails from disposable providers are not allowed here. Sorry."

If, for some bizarre reason, you want to validate that address are from a throwaway provider, you can do that too.

validates :email, :throwaway => true

FAQs

Package last updated on 28 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

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.