client_side_validations 22.0.0 → 22.1.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98b3863f2e2386f76eadb2b85e9d7f927b98c9b678cdce921711a76ed286c4ba
|
4
|
+
data.tar.gz: cd4f16743a959139b498ee519c3f857f4f2f24dfe3fcb0c2b2398640a9bd9131
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48958aa9ea9fefcd8c7580d2f1fae4b7804b9f0959e72e29985d154280800e25306ff75c207dbd04785d484620a615466eda801de11ca22f003cc9bfc6ff9d0d
|
7
|
+
data.tar.gz: 8294a353659edf7a85ec572cf29b975c5e4c24787ec1b838ab963ae1f44d69ceddc6bfe21bc80b430bf877199e364ffedd6b0416ce0b02124fea478db07a65da
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 22.1.1 / 2023-10-08
|
4
|
+
|
5
|
+
* [BUGFIX] Fix a bug with missing translations ([#920](https://github.com/DavyJonesLocker/client_side_validations/issues/920))
|
6
|
+
|
7
|
+
## 22.1.0 / 2023-10-05
|
8
|
+
|
9
|
+
* [FEATURE] Rails 7.1 compatibility
|
10
|
+
|
3
11
|
## 22.0.0 / 2023-09-02
|
4
12
|
|
5
13
|
* [FEATURE] Drop Rails 5.2 and 6.0 support
|
@@ -28,7 +28,7 @@ module ClientSideValidations
|
|
28
28
|
|
29
29
|
def client_side_form_settings(_options, form_helper)
|
30
30
|
{
|
31
|
-
type: self.class.
|
31
|
+
type: self.class.name,
|
32
32
|
input_tag: error_field(form_helper, :span, 'input_tag'),
|
33
33
|
label_tag: error_field(form_helper, :label, 'label_tag')
|
34
34
|
}
|
@@ -18,7 +18,24 @@ module ClientSideValidations
|
|
18
18
|
private
|
19
19
|
|
20
20
|
def build_client_side_hash(model, attribute, options)
|
21
|
-
|
21
|
+
# Rails mutates `options` object when calling `model.errors.generate_message`
|
22
|
+
# by removing `message` option, if any.
|
23
|
+
# By raising on missing translations, CSV has the same behavior across
|
24
|
+
# all supported Rails versions and `config.i18n.raise_on_missing_translations`
|
25
|
+
# possible configurations.
|
26
|
+
options[:raise] = true
|
27
|
+
|
28
|
+
message =
|
29
|
+
begin
|
30
|
+
model.errors.generate_message(attribute, message_type, options)
|
31
|
+
rescue I18n::MissingTranslationData
|
32
|
+
options[:message] = :invalid
|
33
|
+
model.errors.generate_message(attribute, message_type, options)
|
34
|
+
end
|
35
|
+
|
36
|
+
options.delete(:raise)
|
37
|
+
|
38
|
+
{ message: message }.merge(options.except(*callbacks_options - %i[allow_blank if unless]))
|
22
39
|
end
|
23
40
|
|
24
41
|
def message_type
|
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: 22.
|
4
|
+
version: 22.1.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: 2023-
|
12
|
+
date: 2023-10-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: js_regex
|
@@ -34,7 +34,7 @@ dependencies:
|
|
34
34
|
version: '6.1'
|
35
35
|
- - "<"
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version: '7.
|
37
|
+
version: '7.2'
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -44,7 +44,7 @@ dependencies:
|
|
44
44
|
version: '6.1'
|
45
45
|
- - "<"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '7.
|
47
|
+
version: '7.2'
|
48
48
|
description: Client Side Validations made easy for your Rails 5 applications
|
49
49
|
email:
|
50
50
|
- tagliala.dev@gmail.com
|