README.md in valid_email2-2.3.1 vs README.md in valid_email2-3.0.0
- old
+ new
@@ -1,7 +1,7 @@
# ValidEmail2
-[![Build Status](https://travis-ci.org/lisinge/valid_email2.png?branch=master)](https://travis-ci.org/lisinge/valid_email2)
+[![Build Status](https://travis-ci.org/micke/valid_email2.svg?branch=master)](https://travis-ci.org/micke/valid_email2)
[![Gem Version](https://badge.fury.io/rb/valid_email2.png)](http://badge.fury.io/rb/valid_email2)
Validate emails with the help of the `mail` gem instead of some clunky regexp.
Aditionally validate that the domain has a MX record.
Optionally validate against a static [list of disposable email services](vendor/disposable_emails.yml).
@@ -51,25 +51,30 @@
To validate that the domain is not a disposable email:
```ruby
validates :email, 'valid_email_2/email': { disposable: true }
```
-To validate that the domain is not a disposable email or a disposable email but whitelisted (under vendor/whitelist.yml):
+To validate that the domain is not a disposable email or a disposable email but whitelisted (under config/whitelisted_email_domains.yml):
```ruby
validates :email, 'valid_email_2/email': { disposable_with_whitelist: true }
```
-To validate that the domain is not blacklisted (under vendor/blacklist.yml):
+To validate that the domain is not blacklisted (under config/blacklisted_email_domains.yml):
```ruby
validates :email, 'valid_email_2/email': { blacklist: true }
```
To validate that email is not subaddressed:
```ruby
validates :email, 'valid_email_2/email': { disallow_subaddressing: true }
```
+To validate create your own custom message:
+```ruby
+validates :email, 'valid_email_2/email': { message: "is not a valid email" }
+```
+
All together:
```ruby
validates :email, 'valid_email_2/email': { mx: true, disposable: true, disallow_subaddressing: true}
```
@@ -98,12 +103,20 @@
```
## Requirements
This gem requires Rails 3.2 or 4.0 or higher. It is tested against both versions using:
-* Ruby-2.2
* Ruby-2.3
* Ruby-2.4
+* Ruby-2.5
+* Ruby-2.6
+
+## Upgrading to v3.0.0
+
+In version v3.0.0 I decided to move __and__ rename the config files from the
+vendor directory to the config directory. That means:
+`vendor/blacklist.yml` -> `config/blacklisted_email_domains.yml`
+`vendor/whitelist.yml` -> `config/whitelisted_email_domains.yml`
## Upgrading to v2.0.0
In version 1.0 of valid_email2 we only defined the `email` validator.
But since other gems also define a `email` validator this can cause some unintended