client_side_validations 19.0.0 → 19.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +3 -3
- data/lib/client_side_validations/version.rb +1 -1
- data/vendor/assets/javascripts/rails.validations.js +11 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e5904433f3b766e4544605c251a50c28349fbad906456b4823e19ea2700aef1
|
4
|
+
data.tar.gz: 0d3fe57c177d373237ce63c2f905fd2c907579c268e550134f3d954a2b72df61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51f6b2a441831cb479f267a04627badde3d6478f733b7a66792ca9df0e3f4eb403fed52210a7c2001c855b697d9cfeb14f51eb222aadc21b392bebf71d4ad903
|
7
|
+
data.tar.gz: bf6196647cba2846209dd206e2e3bc1eec79f4e07f66720996c1761670288cd8496fcef2a5e620faea34cf8225dfc2856f9eb480773755c9b28dc6acb4ab03e4
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -85,9 +85,9 @@ use the require syntax and make sure that `@client-side-validations/client-side-
|
|
85
85
|
is required after`Turbolinks.start()`, so ClientSideValidations can properly
|
86
86
|
attach its event handlers.
|
87
87
|
|
88
|
-
|
89
|
-
Just make sure that `@client-side-validations/client-side-validations`
|
90
|
-
**after** `
|
88
|
+
[Turbo](https://github.com/hotwired/turbo-rails) automatically calls `start()`,
|
89
|
+
so you can use the `import` syntax. Just make sure that `@client-side-validations/client-side-validations/src`
|
90
|
+
is imported **after** `turbo`, so ClientSideValidations can properly
|
91
91
|
attach its event handlers.
|
92
92
|
|
93
93
|
#### When using Sprockets ####
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Client Side Validations JS - v0.
|
2
|
+
* Client Side Validations JS - v0.3.0 (https://github.com/DavyJonesLocker/client_side_validations)
|
3
3
|
* Copyright (c) 2021 Geremia Taglialatela, Brian Cardarella
|
4
4
|
* Licensed under MIT (https://opensource.org/licenses/mit-license.php)
|
5
5
|
*/
|
@@ -252,9 +252,17 @@
|
|
252
252
|
|
253
253
|
ClientSideValidations.enablers.form(form);
|
254
254
|
},
|
255
|
+
initializeOnEvent: function initializeOnEvent() {
|
256
|
+
if (window.Turbo != null) {
|
257
|
+
return 'turbo:load';
|
258
|
+
} else if (window.Turbolinks != null && window.Turbolinks.supported) {
|
259
|
+
return window.Turbolinks.EVENTS != null ? 'page:change' : 'turbolinks:load';
|
260
|
+
}
|
261
|
+
},
|
255
262
|
start: function start() {
|
256
|
-
|
257
|
-
|
263
|
+
var initializeOnEvent = ClientSideValidations.initializeOnEvent();
|
264
|
+
|
265
|
+
if (initializeOnEvent != null) {
|
258
266
|
jQuery__default["default"](document).on(initializeOnEvent, function () {
|
259
267
|
return jQuery__default["default"](ClientSideValidations.selectors.forms).validate();
|
260
268
|
});
|
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: 19.
|
4
|
+
version: 19.1.0
|
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: 2021-10-
|
12
|
+
date: 2021-10-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|