Project

throwaway

0.0
No commit activity in last 3 years
No release in over 3 years
Validates email addresses are not from a throwaway account provider.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

>= 3.0.0
 Project Readme

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