fanforce-validations 0.4.0 → 0.4.1
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 +4 -6
- 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
|
+
MDY5ZjExODU4MGM3MTk0YmRiYzRjZTYzMjkwOGEzZmY0MjM0OTI3NA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTA3NDQ5NmI4YzhhMmNiMjczMjkwNTE3YTg0NTgxN2RmNTMzNWQwNw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZGM2ODVjMTIxMjcxMzk3ZWFmYTFiODNiMzgyZjcwMDc0ZTBjMTRmMDYyOGY5
|
10
|
+
NTM4YzllMzg0YzhkZGJkODY3ZmQxODVmMWEyY2MzYTVhZTlhYTRmMGU2ZTA3
|
11
|
+
MTE1M2U2ODAzMTU2MzMyOTFiYTdjMWM3Y2M0ZTdiNThjOThlOTg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTg3MDNkMTc4OGJjZGRhNjJkY2M0MWU0NmFhYjIxZTcyYjZjZTBlYTlmN2Qz
|
14
|
+
MDIwNTVhMmYwNDdhOWQwMWVkYjBlNTczZGU5YjE3OTI2YzhkYmY3MWI2NzY3
|
15
|
+
ZTRlYmJmYzRmNTkxMTc4ZGFlM2ZjYWEwNjY1Zjc5YTY1NDEyMDQ=
|
@@ -77,16 +77,14 @@ module Fanforce::Validations
|
|
77
77
|
opts = extract_options!(args).merge(:field => :_external_id)
|
78
78
|
params = extract_validation_params(opts)
|
79
79
|
|
80
|
-
if is_present?(_external_id) and
|
81
|
-
opts[:message] =
|
82
|
-
elsif !_external_id.nil? and _external_id.include?('/')
|
83
|
-
opts[:message] = '_external_id cannot contain forward slashes (/)'
|
80
|
+
if is_present?(_external_id) and _external_id.include?('/')
|
81
|
+
opts[:message] = '_external_id contains one or more forward slashes (/), which is not allowed'
|
84
82
|
else
|
85
83
|
return true
|
86
84
|
end
|
87
85
|
|
88
|
-
|
89
|
-
raise_validation_errors(opts,
|
86
|
+
errors = [format_validation_error(opts, :_external_id, :invalid_data)]
|
87
|
+
raise_validation_errors(opts, errors, Fanforce::Error::RequestFailed)
|
90
88
|
end
|
91
89
|
|
92
90
|
def format_validation_error(opts, fields, default_error_code=nil)
|