validates_phone_format_of 2.0.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/validates_phone_format_of.rb +1 -1
- data/spec/validates_phone_format_of_spec.rb +1 -1
- data/validates_phone_format_of.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d95a25f704075668e80dad65c4903488996b764b1a85e60e8d9a637e7f98bc78
|
4
|
+
data.tar.gz: 6c88e26d10508dfb05de2610d4acf89095f72e47299e02f3f89b1118e98fc98f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eba1ad5e95181fbe86f91777d2a0af98d68417ec518bd59051e8763f81c9f1fb9647325893c2e56064d9f94bd5fc9276385b1962097e0b17ca3f65489f2cb011
|
7
|
+
data.tar.gz: b0622962cd4bf44e9eff7b20c1ae58cfeda0c659f2373cb343e7e9a446de8a512fa29451f61cc240c0ad466090aa9916b9570e79dc38c72382154e9dacf6fefe
|
data/README.md
CHANGED
@@ -11,7 +11,7 @@ validates_phone_format_of is distributed as a gem, which is how it should be use
|
|
11
11
|
|
12
12
|
Include the gem in your Gemfile:
|
13
13
|
|
14
|
-
gem 'validates_phone_format_of', '~>
|
14
|
+
gem 'validates_phone_format_of', '~> 3.0'
|
15
15
|
|
16
16
|
## Usage
|
17
17
|
|
@@ -27,7 +27,7 @@ class User < ActiveRecord::Base
|
|
27
27
|
# Same thing as
|
28
28
|
validates_format_of :phone, with: ValidatesPhoneFormatOf::Regexp
|
29
29
|
# Or
|
30
|
-
validates_format_of :phone, with: /\A
|
30
|
+
validates_format_of :phone, with: /\A\+\d{1,15}\z/
|
31
31
|
|
32
32
|
end
|
33
33
|
```
|
@@ -28,7 +28,7 @@ describe ValidatesPhoneFormatOf do
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
-
['test', '0000', '(312) 555-1212'].each do |phone|
|
31
|
+
['test', '0000', '(312) 555-1212', '3125551212'].each do |phone|
|
32
32
|
it "#{phone} is not valid" do
|
33
33
|
user = @user_class.new(phone)
|
34
34
|
expect(user.valid?).to_not be_truthy
|
@@ -2,7 +2,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = 'validates_phone_format_of'
|
5
|
-
spec.version = '
|
5
|
+
spec.version = '3.0.0'
|
6
6
|
spec.authors = ['Jonathan VUKOVICH-TRIBOUHARET']
|
7
7
|
spec.email = ['jonathan.tribouharet@gmail.com']
|
8
8
|
|