client_side_validations 10.0.0 → 10.0.1
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/CHANGELOG.md +4 -0
- data/lib/client_side_validations/version.rb +1 -1
- data/vendor/assets/javascripts/rails.validations.js +6 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c8881a1ecca9dfb2235fcee5a001fec7013d582
|
4
|
+
data.tar.gz: ef25a4a99a57a55f32f58fc0cf8123ce904aa1eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d113890b7b37a533aec7e260af33463e3f08a2d62f9fbabe2fa7af04a8d7805d70b9b918fdd494b56ac0307f79e33aabbb8218abfbcf28eceb3bd2aa9629cd16
|
7
|
+
data.tar.gz: 784364e0c9e97a6b6f0ceca96579b7ee713690e5f6b7c1af6d511c1b1299db9f15b00a5be4bb356d6cde3d73df72d2f3975c04878b046d8184a3bffa2ef8e005
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 10.0.1 / 2017-10-10
|
4
|
+
|
5
|
+
* [BUGFIX] Fix regression in JavaScript numericality validator ([#724](https://github.com/DavyJonesLocker/client_side_validations/issues/724))
|
6
|
+
|
3
7
|
## 10.0.0 / 2017-10-09
|
4
8
|
|
5
9
|
* [FEATURE] Refactor client-side numericality validator ([#717](https://github.com/DavyJonesLocker/client_side_validations/issues/717))
|
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
2
|
/*!
|
3
|
-
* Client Side Validations - v10.0.
|
3
|
+
* Client Side Validations - v10.0.1 (https://github.com/DavyJonesLocker/client_side_validations)
|
4
4
|
* Copyright (c) 2017 Geremia Taglialatela, Brian Cardarella
|
5
5
|
* Licensed under MIT (http://opensource.org/licenses/mit-license.php)
|
6
6
|
*/
|
@@ -366,6 +366,11 @@
|
|
366
366
|
},
|
367
367
|
numericality: function(element, options) {
|
368
368
|
var $form, CHECKS, check, checkValue, fn, number_format, operator, val;
|
369
|
+
if (options.allow_blank === true && this.presence(element, {
|
370
|
+
message: options.messages.numericality
|
371
|
+
})) {
|
372
|
+
return;
|
373
|
+
}
|
369
374
|
$form = $(element[0].form);
|
370
375
|
number_format = $form[0].ClientSideValidations.settings.number_format;
|
371
376
|
val = $.trim(element.val()).replace(new RegExp("\\" + number_format.separator, 'g'), '.');
|
@@ -373,11 +378,6 @@
|
|
373
378
|
return options.messages.only_integer;
|
374
379
|
}
|
375
380
|
if (!ClientSideValidations.patterns.numericality["default"].test(val)) {
|
376
|
-
if (options.allow_blank === true && this.presence(element, {
|
377
|
-
message: options.messages.numericality
|
378
|
-
})) {
|
379
|
-
return;
|
380
|
-
}
|
381
381
|
return options.messages.numericality;
|
382
382
|
}
|
383
383
|
CHECKS = {
|
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: 10.0.
|
4
|
+
version: 10.0.1
|
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: 2017-10-
|
12
|
+
date: 2017-10-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|