client_side_validations 4.2.7 → 4.2.9
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f643e57420f1428104b4224687c2306e74be1a65
|
4
|
+
data.tar.gz: fe4a50958af1bd266dea77e8e48d55d78fc4fd55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd458e0b82cf15bc624258c0c3e83ae37fc70910f675bb847ae67d49758b73e5a08005cddf9d740b0c05bbe7ff3480666a601fcd7f05fadef6d8a4817fc0e417
|
7
|
+
data.tar.gz: 2319f9bb32cbc61c36752907eeed0bfa466449d8a4d4b8a23af3e03a9c52b34965da7eee18ba2cfac2739bde54b8981bf6cc70fcead06e98329907e0ed2a0375
|
data/HISTORY.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
## Version 4.2
|
4
4
|
|
5
|
+
* [v4.2.9](https://github.com/DavyJonesLocker/client_side_validations/compare/v4.2.8...v4.2.9)
|
6
|
+
* [v4.2.8](https://github.com/DavyJonesLocker/client_side_validations/compare/v4.2.7...v4.2.8)
|
5
7
|
* [v4.2.7](https://github.com/DavyJonesLocker/client_side_validations/compare/v4.2.6...v4.2.7)
|
6
8
|
* [v4.2.6](https://github.com/DavyJonesLocker/client_side_validations/compare/v4.2.5...v4.2.6)
|
7
9
|
* [v4.2.5](https://github.com/DavyJonesLocker/client_side_validations/compare/v4.2.4...v4.2.5)
|
@@ -4,7 +4,7 @@ module ClientSideValidations
|
|
4
4
|
@@option_map = {}
|
5
5
|
|
6
6
|
def self.included(base)
|
7
|
-
@@option_map.merge!(base::CHECKS.keys.inject({}) { |
|
7
|
+
@@option_map.merge!(base::CHECKS.keys.inject({}) { |acc, elem| acc.merge!(elem => elem) })
|
8
8
|
end
|
9
9
|
|
10
10
|
def client_side_hash(model, attribute, force = nil)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
2
|
/*!
|
3
|
-
* Client Side Validations - v4.2.
|
3
|
+
* Client Side Validations - v4.2.9 (https://github.com/DavyJonesLocker/client_side_validations)
|
4
4
|
* Copyright (c) 2016 Geremia Taglialatela, Brian Cardarella
|
5
5
|
* Licensed under MIT (http://opensource.org/licenses/mit-license.php)
|
6
6
|
*/
|
@@ -332,7 +332,7 @@
|
|
332
332
|
}
|
333
333
|
},
|
334
334
|
numericality: function(element, options) {
|
335
|
-
var CHECKS, check,
|
335
|
+
var CHECKS, check, checkValue, fn, form, operator, val;
|
336
336
|
val = $.trim(element.val());
|
337
337
|
if (!ClientSideValidations.patterns.numericality.test(val)) {
|
338
338
|
if (options.allow_blank === true && this.presence(element, {
|
@@ -359,14 +359,11 @@
|
|
359
359
|
if (!(options[check] != null)) {
|
360
360
|
continue;
|
361
361
|
}
|
362
|
-
|
363
|
-
|
364
|
-
} else if (form.find("[name*=" + options[check] + "]").size() === 1) {
|
365
|
-
check_value = form.find("[name*=" + options[check] + "]").val();
|
366
|
-
} else {
|
362
|
+
checkValue = !isNaN(parseFloat(options[check])) && isFinite(options[check]) ? options[check] : form.find("[name*=" + options[check] + "]").length === 1 ? form.find("[name*=" + options[check] + "]").val() : void 0;
|
363
|
+
if ((checkValue == null) || checkValue === '') {
|
367
364
|
return;
|
368
365
|
}
|
369
|
-
fn = new Function("return " + val + " " + operator + " " +
|
366
|
+
fn = new Function("return " + val + " " + operator + " " + checkValue);
|
370
367
|
if (!fn()) {
|
371
368
|
return options.messages[check];
|
372
369
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: client_side_validations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.2.
|
4
|
+
version: 4.2.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geremia Taglialatela
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-11-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -153,14 +153,14 @@ dependencies:
|
|
153
153
|
requirements:
|
154
154
|
- - "~>"
|
155
155
|
- !ruby/object:Gem::Version
|
156
|
-
version: '1.
|
156
|
+
version: '1.2'
|
157
157
|
type: :development
|
158
158
|
prerelease: false
|
159
159
|
version_requirements: !ruby/object:Gem::Requirement
|
160
160
|
requirements:
|
161
161
|
- - "~>"
|
162
162
|
- !ruby/object:Gem::Version
|
163
|
-
version: '1.
|
163
|
+
version: '1.2'
|
164
164
|
- !ruby/object:Gem::Dependency
|
165
165
|
name: rake
|
166
166
|
requirement: !ruby/object:Gem::Requirement
|
@@ -181,14 +181,14 @@ dependencies:
|
|
181
181
|
requirements:
|
182
182
|
- - "~>"
|
183
183
|
- !ruby/object:Gem::Version
|
184
|
-
version: 0.
|
184
|
+
version: 0.45.0
|
185
185
|
type: :development
|
186
186
|
prerelease: false
|
187
187
|
version_requirements: !ruby/object:Gem::Requirement
|
188
188
|
requirements:
|
189
189
|
- - "~>"
|
190
190
|
- !ruby/object:Gem::Version
|
191
|
-
version: 0.
|
191
|
+
version: 0.45.0
|
192
192
|
- !ruby/object:Gem::Dependency
|
193
193
|
name: simplecov
|
194
194
|
requirement: !ruby/object:Gem::Requirement
|
@@ -334,7 +334,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
334
334
|
version: '0'
|
335
335
|
requirements: []
|
336
336
|
rubyforge_project:
|
337
|
-
rubygems_version: 2.
|
337
|
+
rubygems_version: 2.5.1
|
338
338
|
signing_key:
|
339
339
|
specification_version: 4
|
340
340
|
summary: Client Side Validations
|