Skip to content

Ruby gem which validates email addresses are not from a throwaway address provider

Notifications You must be signed in to change notification settings

whamilton42/throwaway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Ruby gem which validates email addresses are not from a throwaway address provider

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages