fanforce-validations 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/fanforce/validations/validations.rb +2 -2
- data/lib/fanforce/validations/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
M2YyZGIxMDcyMmNjZDhhMzcwZjFiYWYwYjY4MjA3Y2RkMjkwNGNhNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ODBkNGYyOGU3YTQ5YTQ3ZjJhZjQyNmZkZGQxYjJiNzAyYjBlYTk3ZQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzExZmNmMDRiZWIxY2U2ZDMzM2ExOTJlNTJkZGE0ZjdmMmVjZDhhZmQxODNm
|
10
|
+
Y2QzOGExOGNiYjQ4YjQ0NTA3Zjc1MTNiYzUyNmIyYWI5ZTI4OTM1ZDliZDA4
|
11
|
+
ZDVlYmYzNTE2MTFlZjkyYWYzYzJhYjczYzM5ZDY4NjcxZDM4YWQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MTM1NTZjYjYzNWYzNGUzYzc4Yzc1YmY1MGEzNzliNzhjY2NjODUxMGM2ODIy
|
14
|
+
MTFmNjNmZWM2MTYzNjYzODZhM2ZjMDcwMWY4ODMyYTQxYmMwNDA2Nzk5MzY3
|
15
|
+
MjhlMDYxZjljOGFhMzM2ODJiZjY0NzYyYzk2MTU2MDE0NzhlNmQ=
|
@@ -75,11 +75,11 @@ module Fanforce::Validations
|
|
75
75
|
def validates_format_of_external_id(*args)
|
76
76
|
opts = extract_options!(args).merge(:field => :_external_id)
|
77
77
|
params = extract_validation_params(opts)
|
78
|
-
_external_id = args
|
78
|
+
_external_id = args.first
|
79
79
|
|
80
80
|
if is_present?(_external_id) and !_external_id.is_a?(String)
|
81
81
|
opts[:message] = "id must be a string but was a #{_external_id.class.name}"
|
82
|
-
elsif _external_id.include('/')
|
82
|
+
elsif _external_id.include?('/')
|
83
83
|
opts[:message] = 'id cannot contain forward slashes (/)'
|
84
84
|
else
|
85
85
|
return true
|