README.md in email_inquire-0.8.0 vs README.md in email_inquire-0.9.0

- old
+ new

@@ -1,8 +1,8 @@ # EmailInquire -[![Gem Version](https://badge.fury.io/rb/email_inquire.svg)](https://badge.fury.io/rb/email_inquire) [![Build Status](https://travis-ci.org/maximeg/email_inquire.svg?branch=master)](https://travis-ci.org/maximeg/email_inquire) [![codecov](https://codecov.io/gh/maximeg/email_inquire/branch/master/graph/badge.svg)](https://codecov.io/gh/maximeg/email_inquire) [![Dependency Status](https://gemnasium.com/badges/github.com/maximeg/email_inquire.svg)](https://gemnasium.com/github.com/maximeg/email_inquire) [![Code Climate](https://codeclimate.com/github/maximeg/email_inquire/badges/gpa.svg)](https://codeclimate.com/github/maximeg/email_inquire) +[![Gem Version](https://badge.fury.io/rb/email_inquire.svg)](https://badge.fury.io/rb/email_inquire) [![Build Status](https://travis-ci.org/maximeg/email_inquire.svg?branch=master)](https://travis-ci.org/maximeg/email_inquire) [![codecov](https://codecov.io/gh/maximeg/email_inquire/branch/master/graph/badge.svg)](https://codecov.io/gh/maximeg/email_inquire) [![Code Climate](https://codeclimate.com/github/maximeg/email_inquire/badges/gpa.svg)](https://codeclimate.com/github/maximeg/email_inquire) EmailInquire is a library to validate email for format, common typos and one-time email providers. [Changelog](https://github.com/maximeg/email_inquire/blob/master/CHANGELOG.md) @@ -64,11 +64,11 @@ - `free.com` => hint `free.fr` - `laposte.com` => hint `laposte.net` - `laposte.fr` => hint `laposte.net` - ... -3764 one-time email providers (a.k.a. burners, or disposable email +3981 one-time email providers (a.k.a. burners, or disposable email [source](https://github.com/wesbos/burner-email-providers)): - `yopmail.com` => invalid - ... @@ -153,9 +153,30 @@ ```ruby response = EmailInquire.validate("john.doe@bad-domain.com") response.status # :invalid response.valid? # false response.invalid? # true +``` + +A custom valid case: + +```ruby +# in config/initializers/email_inquire.rb +EmailInquire.custom_valid_domains << "example.com" # would be otherwise invalid +EmailInquire.custom_valid_domains << "sfr.com" # would be otherwise hinted to "sfr.fr" +``` + +then: +```ruby +response = EmailInquire.validate("john.doe@example.com") +response.status # :valid +response.valid? # true +response.invalid? # false + +response = EmailInquire.validate("john.doe@sfr.com") +response.status # :valid +response.valid? # true +response.invalid? # false ``` ### Hint I think it's important to just offer a hint to the user and to not automatically replace the