mirror of
https://github.com/disposable-email-domains/disposable-email-domains.git
synced 2024-11-22 16:48:13 +08:00
Merge pull request #67 from MitsunChieh/update_blacklist
update blacklist
This commit is contained in:
commit
5e2713bc81
17
README.md
17
README.md
@ -32,6 +32,23 @@ function is_temp_mail($mail) {
|
|||||||
return in_array(explode('@', $mail)[1], $mail_domains_ko);
|
return in_array(explode('@', $mail)[1], $mail_domains_ko);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
Ruby on Rails
|
||||||
|
|
||||||
|
In resource model, usually it is `user.rb`
|
||||||
|
```Ruby
|
||||||
|
before_validation :reject_email_blacklist
|
||||||
|
|
||||||
|
def reject_email_blacklist
|
||||||
|
blacklist = File.read('config/disposable_email_blacklist.conf').split("\n")
|
||||||
|
|
||||||
|
if blacklist.include?(email.split('@')[1])
|
||||||
|
errors[:email] << 'invalid email'
|
||||||
|
return false
|
||||||
|
else
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
```
|
||||||
|
|
||||||
Contributing
|
Contributing
|
||||||
============
|
============
|
||||||
|
@ -586,6 +586,7 @@ esprity.com
|
|||||||
etranquil.com
|
etranquil.com
|
||||||
etranquil.net
|
etranquil.net
|
||||||
etranquil.org
|
etranquil.org
|
||||||
|
euaqa.com
|
||||||
evanfox.info
|
evanfox.info
|
||||||
evopo.com
|
evopo.com
|
||||||
example.com
|
example.com
|
||||||
@ -869,6 +870,7 @@ hungpackage.com
|
|||||||
huskion.net
|
huskion.net
|
||||||
hvastudiesucces.nl
|
hvastudiesucces.nl
|
||||||
hwsye.net
|
hwsye.net
|
||||||
|
iaoss.com
|
||||||
ibnuh.bz
|
ibnuh.bz
|
||||||
icantbelieveineedtoexplainthisshit.com
|
icantbelieveineedtoexplainthisshit.com
|
||||||
icx.in
|
icx.in
|
||||||
|
Loading…
Reference in New Issue
Block a user