client_side_validations 10.0.0 → 10.0.1

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: 1c59886758b11f1721e68456f762260ebac95d5e
4
- data.tar.gz: 1295e066607efc41e1aed2d9b1e7b928a40fbf3b
3
+ metadata.gz: 6c8881a1ecca9dfb2235fcee5a001fec7013d582
4
+ data.tar.gz: ef25a4a99a57a55f32f58fc0cf8123ce904aa1eb
5
5
  SHA512:
6
- metadata.gz: 79707fcac5b515a7c618e17d0a0eef06a0bd3c20e63400574368bc46002231380d715059d73d3e864c3943d4f0cbf09f203baf7c7dd5466bb340047a18b17ae4
7
- data.tar.gz: 3aa020cec77bcf778ce766f5f1e3f45ff742ac6cb071b9a7610ebde3081af41d77312b51960ebd6300dea94663fff512f0dc1aa58f2bbf08c3a9cd1b67caf56f
6
+ metadata.gz: d113890b7b37a533aec7e260af33463e3f08a2d62f9fbabe2fa7af04a8d7805d70b9b918fdd494b56ac0307f79e33aabbb8218abfbcf28eceb3bd2aa9629cd16
7
+ data.tar.gz: 784364e0c9e97a6b6f0ceca96579b7ee713690e5f6b7c1af6d511c1b1299db9f15b00a5be4bb356d6cde3d73df72d2f3975c04878b046d8184a3bffa2ef8e005
@@ -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,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ClientSideValidations
4
- VERSION = '10.0.0'.freeze
4
+ VERSION = '10.0.1'.freeze
5
5
  end
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*!
3
- * Client Side Validations - v10.0.0 (https://github.com/DavyJonesLocker/client_side_validations)
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.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-09 00:00:00.000000000 Z
12
+ date: 2017-10-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails