validators 2.4.2 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +8 -0
- data/data/disposable.json +798 -0
- data/data/tld.json +888 -0
- data/lib/validators/disposable_hostnames.rb +9 -0
- data/lib/validators/tld.rb +2 -2
- data/lib/validators/validates_email_format_of.rb +16 -0
- data/lib/validators/version.rb +2 -2
- data/lib/validators.rb +3 -0
- data/spec/spec_helper.rb +2 -1
- data/spec/support/translations.yml +1 -0
- data/spec/validators/disposable_email_spec.rb +31 -0
- data/spec/validators/validates_email_format_of_spec.rb +0 -1
- metadata +7 -4
- data/Gemfile.lock +0 -94
- data/data/tld.txt +0 -886
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a975ecc3bdf98226dc3079671f87436a795418e3
|
4
|
+
data.tar.gz: 4027ec27214fc255ed5c81294f588e8f63a12b6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebf48747e0d37e41b47c80c72f884e4ff04f4b819a11c7bc96c9ccc2f523fa6b44c1bd9ea310964976455718bbf0340b2c12399a90a5fd5683099538e5e94421
|
7
|
+
data.tar.gz: 94b2c41b85bd3d0a8e685c0b34f10ebe0fb03ffbc5e1f0bbe943a5ad31c6ed08261ed2437020bd9de42e43a67f1713ec18e6a32f52d58d20c0832737ff20bf92
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -32,6 +32,14 @@ class User < ActiveRecord::Base
|
|
32
32
|
end
|
33
33
|
```
|
34
34
|
|
35
|
+
By default, it rejects disposable e-mails (e.g. mailinator). This loads ~15kb, but you can disable this validation by settings `disposable: true`.
|
36
|
+
|
37
|
+
```ruby
|
38
|
+
class User < ActiveRecord::Base
|
39
|
+
validates_email_format_of :email, disposable: true
|
40
|
+
end
|
41
|
+
```
|
42
|
+
|
35
43
|
### validates_url_format_of
|
36
44
|
|
37
45
|
```ruby
|