big-phoney 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/big-phoney.gemspec +1 -1
- data/lib/big_phoney/rails.rb +2 -1
- metadata +3 -3
data/big-phoney.gemspec
CHANGED
data/lib/big_phoney/rails.rb
CHANGED
@@ -21,7 +21,8 @@ module BigPhoney
|
|
21
21
|
record.errors[attribute] << "must be a valid US phone number"
|
22
22
|
end
|
23
23
|
|
24
|
-
|
24
|
+
country_code = record.respond_to?(:country_code) && record.country_code
|
25
|
+
if number and not BigPhoney::PhoneNumber.new(number, :country_code => country_code).valid?
|
25
26
|
if record.errors[attribute].empty?
|
26
27
|
record.errors[attribute] << "is not valid"
|
27
28
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: big-phoney
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 4
|
10
|
+
version: 0.1.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Pat Nakajima
|