dry-validation 0.13.3 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +390 -95
- data/LICENSE +1 -1
- data/README.md +15 -12
- data/config/errors.yml +3 -88
- data/dry-validation.gemspec +30 -19
- data/lib/dry-validation.rb +2 -0
- data/lib/dry/validation.rb +47 -28
- data/lib/dry/validation/config.rb +24 -0
- data/lib/dry/validation/constants.rb +43 -0
- data/lib/dry/validation/contract.rb +160 -0
- data/lib/dry/validation/contract/class_interface.rb +222 -0
- data/lib/dry/validation/evaluator.rb +198 -0
- data/lib/dry/validation/extensions/hints.rb +69 -0
- data/lib/dry/validation/extensions/monads.rb +23 -7
- data/lib/dry/validation/extensions/predicates_as_macros.rb +75 -0
- data/lib/dry/validation/failures.rb +65 -0
- data/lib/dry/validation/function.rb +44 -0
- data/lib/dry/validation/macro.rb +38 -0
- data/lib/dry/validation/macros.rb +104 -0
- data/lib/dry/validation/message.rb +79 -79
- data/lib/dry/validation/message_set.rb +109 -88
- data/lib/dry/validation/messages/resolver.rb +106 -0
- data/lib/dry/validation/result.rb +168 -40
- data/lib/dry/validation/rule.rb +135 -0
- data/lib/dry/validation/schema_ext.rb +46 -0
- data/lib/dry/validation/values.rb +95 -0
- data/lib/dry/validation/version.rb +3 -1
- metadata +45 -335
- data/.codeclimate.yml +0 -17
- data/.gitignore +0 -9
- data/.rspec +0 -3
- data/.travis.yml +0 -29
- data/CONTRIBUTING.md +0 -31
- data/Gemfile +0 -25
- data/Rakefile +0 -22
- data/benchmarks/benchmark_form_invalid.rb +0 -64
- data/benchmarks/benchmark_form_valid.rb +0 -64
- data/benchmarks/benchmark_schema_invalid_huge.rb +0 -52
- data/benchmarks/profile_schema_call_invalid.rb +0 -20
- data/benchmarks/profile_schema_call_valid.rb +0 -20
- data/benchmarks/profile_schema_definition.rb +0 -14
- data/benchmarks/profile_schema_huge_invalid.rb +0 -30
- data/benchmarks/profile_schema_messages_invalid.rb +0 -20
- data/benchmarks/suite.rb +0 -5
- data/examples/basic.rb +0 -15
- data/examples/each.rb +0 -14
- data/examples/json.rb +0 -12
- data/examples/multiple.rb +0 -27
- data/examples/nested.rb +0 -22
- data/examples/params.rb +0 -11
- data/lib/dry/validation/compat/form.rb +0 -67
- data/lib/dry/validation/deprecations.rb +0 -24
- data/lib/dry/validation/executor.rb +0 -91
- data/lib/dry/validation/extensions.rb +0 -7
- data/lib/dry/validation/extensions/struct.rb +0 -32
- data/lib/dry/validation/input_processor_compiler.rb +0 -137
- data/lib/dry/validation/input_processor_compiler/json.rb +0 -45
- data/lib/dry/validation/input_processor_compiler/params.rb +0 -49
- data/lib/dry/validation/input_processor_compiler/sanitizer.rb +0 -47
- data/lib/dry/validation/message_compiler.rb +0 -188
- data/lib/dry/validation/message_compiler/visitor_opts.rb +0 -37
- data/lib/dry/validation/messages.rb +0 -14
- data/lib/dry/validation/messages/abstract.rb +0 -119
- data/lib/dry/validation/messages/i18n.rb +0 -47
- data/lib/dry/validation/messages/namespaced.rb +0 -39
- data/lib/dry/validation/messages/yaml.rb +0 -61
- data/lib/dry/validation/predicate_registry.rb +0 -115
- data/lib/dry/validation/predicates.rb +0 -19
- data/lib/dry/validation/schema.rb +0 -126
- data/lib/dry/validation/schema/check.rb +0 -37
- data/lib/dry/validation/schema/class_interface.rb +0 -190
- data/lib/dry/validation/schema/deprecated.rb +0 -30
- data/lib/dry/validation/schema/dsl.rb +0 -118
- data/lib/dry/validation/schema/form.rb +0 -9
- data/lib/dry/validation/schema/json.rb +0 -21
- data/lib/dry/validation/schema/key.rb +0 -71
- data/lib/dry/validation/schema/params.rb +0 -22
- data/lib/dry/validation/schema/rule.rb +0 -202
- data/lib/dry/validation/schema/value.rb +0 -211
- data/lib/dry/validation/schema_compiler.rb +0 -81
- data/lib/dry/validation/template.rb +0 -66
- data/lib/dry/validation/type_specs.rb +0 -70
- data/spec/extensions/monads/result_spec.rb +0 -40
- data/spec/extensions/struct/schema_spec.rb +0 -32
- data/spec/fixtures/locales/en.yml +0 -8
- data/spec/fixtures/locales/pl.yml +0 -22
- data/spec/integration/custom_error_messages_spec.rb +0 -54
- data/spec/integration/custom_predicates_spec.rb +0 -228
- data/spec/integration/hints_spec.rb +0 -170
- data/spec/integration/injecting_rules_spec.rb +0 -30
- data/spec/integration/json/defining_base_schema_spec.rb +0 -41
- data/spec/integration/localized_error_messages_spec.rb +0 -72
- data/spec/integration/message_compiler_spec.rb +0 -405
- data/spec/integration/messages/i18n_spec.rb +0 -104
- data/spec/integration/optional_keys_spec.rb +0 -28
- data/spec/integration/params/predicates/array_spec.rb +0 -287
- data/spec/integration/params/predicates/empty_spec.rb +0 -263
- data/spec/integration/params/predicates/eql_spec.rb +0 -327
- data/spec/integration/params/predicates/even_spec.rb +0 -455
- data/spec/integration/params/predicates/excluded_from_spec.rb +0 -455
- data/spec/integration/params/predicates/excludes_spec.rb +0 -391
- data/spec/integration/params/predicates/false_spec.rb +0 -455
- data/spec/integration/params/predicates/filled_spec.rb +0 -467
- data/spec/integration/params/predicates/format_spec.rb +0 -454
- data/spec/integration/params/predicates/gt_spec.rb +0 -519
- data/spec/integration/params/predicates/gteq_spec.rb +0 -519
- data/spec/integration/params/predicates/included_in_spec.rb +0 -455
- data/spec/integration/params/predicates/includes_spec.rb +0 -391
- data/spec/integration/params/predicates/key_spec.rb +0 -67
- data/spec/integration/params/predicates/lt_spec.rb +0 -519
- data/spec/integration/params/predicates/lteq_spec.rb +0 -519
- data/spec/integration/params/predicates/max_size_spec.rb +0 -391
- data/spec/integration/params/predicates/min_size_spec.rb +0 -391
- data/spec/integration/params/predicates/none_spec.rb +0 -265
- data/spec/integration/params/predicates/not_eql_spec.rb +0 -327
- data/spec/integration/params/predicates/odd_spec.rb +0 -455
- data/spec/integration/params/predicates/size/fixed_spec.rb +0 -393
- data/spec/integration/params/predicates/size/range_spec.rb +0 -396
- data/spec/integration/params/predicates/true_spec.rb +0 -455
- data/spec/integration/params/predicates/type_spec.rb +0 -391
- data/spec/integration/result_spec.rb +0 -81
- data/spec/integration/schema/array_schema_spec.rb +0 -59
- data/spec/integration/schema/check_rules_spec.rb +0 -119
- data/spec/integration/schema/check_with_nested_el_spec.rb +0 -37
- data/spec/integration/schema/check_with_nth_el_spec.rb +0 -25
- data/spec/integration/schema/default_settings_spec.rb +0 -11
- data/spec/integration/schema/defining_base_schema_spec.rb +0 -41
- data/spec/integration/schema/dynamic_predicate_args_spec.rb +0 -43
- data/spec/integration/schema/each_with_set_spec.rb +0 -70
- data/spec/integration/schema/extending_dsl_spec.rb +0 -27
- data/spec/integration/schema/form_spec.rb +0 -236
- data/spec/integration/schema/hash_schema_spec.rb +0 -47
- data/spec/integration/schema/inheriting_schema_spec.rb +0 -31
- data/spec/integration/schema/input_processor_spec.rb +0 -46
- data/spec/integration/schema/json/explicit_types_spec.rb +0 -157
- data/spec/integration/schema/json_spec.rb +0 -163
- data/spec/integration/schema/macros/confirmation_spec.rb +0 -35
- data/spec/integration/schema/macros/each_spec.rb +0 -268
- data/spec/integration/schema/macros/filled_spec.rb +0 -87
- data/spec/integration/schema/macros/input_spec.rb +0 -139
- data/spec/integration/schema/macros/maybe_spec.rb +0 -99
- data/spec/integration/schema/macros/rule_spec.rb +0 -75
- data/spec/integration/schema/macros/value_spec.rb +0 -119
- data/spec/integration/schema/macros/when_spec.rb +0 -62
- data/spec/integration/schema/nested_schemas_spec.rb +0 -236
- data/spec/integration/schema/nested_values_spec.rb +0 -46
- data/spec/integration/schema/not_spec.rb +0 -34
- data/spec/integration/schema/numbers_spec.rb +0 -19
- data/spec/integration/schema/option_with_default_spec.rb +0 -64
- data/spec/integration/schema/or_spec.rb +0 -87
- data/spec/integration/schema/params/defining_base_schema_spec.rb +0 -41
- data/spec/integration/schema/params/explicit_types_spec.rb +0 -195
- data/spec/integration/schema/params_spec.rb +0 -234
- data/spec/integration/schema/predicate_verification_spec.rb +0 -9
- data/spec/integration/schema/predicates/array_spec.rb +0 -295
- data/spec/integration/schema/predicates/custom_spec.rb +0 -103
- data/spec/integration/schema/predicates/empty_spec.rb +0 -263
- data/spec/integration/schema/predicates/eql_spec.rb +0 -327
- data/spec/integration/schema/predicates/even_spec.rb +0 -455
- data/spec/integration/schema/predicates/excluded_from/array_spec.rb +0 -459
- data/spec/integration/schema/predicates/excluded_from/range_spec.rb +0 -459
- data/spec/integration/schema/predicates/excludes_spec.rb +0 -391
- data/spec/integration/schema/predicates/filled_spec.rb +0 -467
- data/spec/integration/schema/predicates/format_spec.rb +0 -455
- data/spec/integration/schema/predicates/gt_spec.rb +0 -519
- data/spec/integration/schema/predicates/gteq_spec.rb +0 -519
- data/spec/integration/schema/predicates/hash_spec.rb +0 -69
- data/spec/integration/schema/predicates/included_in/array_spec.rb +0 -459
- data/spec/integration/schema/predicates/included_in/range_spec.rb +0 -459
- data/spec/integration/schema/predicates/includes_spec.rb +0 -391
- data/spec/integration/schema/predicates/key_spec.rb +0 -88
- data/spec/integration/schema/predicates/lt_spec.rb +0 -520
- data/spec/integration/schema/predicates/lteq_spec.rb +0 -519
- data/spec/integration/schema/predicates/max_size_spec.rb +0 -391
- data/spec/integration/schema/predicates/min_size_spec.rb +0 -391
- data/spec/integration/schema/predicates/none_spec.rb +0 -265
- data/spec/integration/schema/predicates/not_eql_spec.rb +0 -391
- data/spec/integration/schema/predicates/odd_spec.rb +0 -455
- data/spec/integration/schema/predicates/size/fixed_spec.rb +0 -398
- data/spec/integration/schema/predicates/size/range_spec.rb +0 -395
- data/spec/integration/schema/predicates/type_spec.rb +0 -413
- data/spec/integration/schema/reusing_schema_spec.rb +0 -33
- data/spec/integration/schema/using_types_spec.rb +0 -135
- data/spec/integration/schema/validate_spec.rb +0 -120
- data/spec/integration/schema/xor_spec.rb +0 -35
- data/spec/integration/schema_builders_spec.rb +0 -17
- data/spec/integration/schema_spec.rb +0 -173
- data/spec/shared/message_compiler.rb +0 -11
- data/spec/shared/predicate_helper.rb +0 -15
- data/spec/shared/rule_compiler.rb +0 -8
- data/spec/spec_helper.rb +0 -62
- data/spec/support/define_struct.rb +0 -25
- data/spec/support/matchers.rb +0 -38
- data/spec/support/mutant.rb +0 -9
- data/spec/support/predicates_integration.rb +0 -7
- data/spec/unit/input_processor_compiler/json_spec.rb +0 -283
- data/spec/unit/input_processor_compiler/params_spec.rb +0 -328
- data/spec/unit/message_compiler/visit_failure_spec.rb +0 -38
- data/spec/unit/message_compiler/visit_spec.rb +0 -16
- data/spec/unit/message_compiler_spec.rb +0 -7
- data/spec/unit/predicate_registry_spec.rb +0 -34
- data/spec/unit/schema/key_spec.rb +0 -38
- data/spec/unit/schema/rule_spec.rb +0 -42
- data/spec/unit/schema/value_spec.rb +0 -131
- data/spec/unit/schema_spec.rb +0 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea571eab29d2c8f50457cd8472a8f0d66da98bfda7f7fd1b697776532193b12d
|
4
|
+
data.tar.gz: 0e45ff77064b269b25e4c9dbc84219dcc78e07390bb14e75dd2fa0ab24593096
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddc760c72d530ceada83071591ebb7d214ed1c1fe7ec56486120170cd8b32a50916468dc086018820d3505a1eb14df1cbfe07a80b212da7c5f67c262dc47847b
|
7
|
+
data.tar.gz: d06df105ce8e8a9ef8720dd6df9748585c9621a39bca8a73067e337ad153edbdbd052581be687a6df9bc0c62e16b1ad9fb8866014a0d4ba9a2c411c31d892610
|
data/CHANGELOG.md
CHANGED
@@ -1,62 +1,343 @@
|
|
1
|
-
|
1
|
+
## 1.4.2 2020-01-18
|
2
|
+
|
3
|
+
|
4
|
+
### Fixed
|
5
|
+
|
6
|
+
- Macros using predicates that accept a range argument work as expected (no need to wrap the argument in an array) (@waiting-for-dev)
|
7
|
+
|
8
|
+
|
9
|
+
[Compare v1.4.1...v1.4.2](https://github.com/dry-rb/dry-validation/compare/v1.4.1...v1.4.2)
|
10
|
+
|
11
|
+
## 1.4.1 2020-01-08
|
12
|
+
|
13
|
+
|
14
|
+
### Added
|
15
|
+
|
16
|
+
- Pattern matching on result values (@flash-gordon)
|
17
|
+
|
18
|
+
### Fixed
|
19
|
+
|
20
|
+
- List tokens are correctly interpolated as a comma separated list in rule messages (see #611) (@waiting-for-dev)
|
21
|
+
- Warnings about delegated keywords (@flash-gordon)
|
22
|
+
|
23
|
+
|
24
|
+
[Compare v1.4.0...v1.4.1](https://github.com/dry-rb/dry-validation/compare/v1.4.0...v1.4.1)
|
25
|
+
|
26
|
+
## 1.4.0 2019-12-12
|
27
|
+
|
28
|
+
|
29
|
+
### Added
|
30
|
+
|
31
|
+
- Support for multi-schema inheritance (@ianwhite)
|
32
|
+
|
33
|
+
### Fixed
|
34
|
+
|
35
|
+
- Keyword warnings reported by Ruby 2.7 (@flash-gordon)
|
36
|
+
- Fixed an issue where `MessageSet` would be marked as empty too early (@ianwhite)
|
37
|
+
- Messages are correctly generated when there are errors for both an array and one or more of its elements (see #599) (@Bugagazavr)
|
38
|
+
|
39
|
+
### Changed
|
40
|
+
|
41
|
+
- A meaningful exception is raised when failure options are not valid (@MatElGran)
|
42
|
+
- [internal] improved performance in `Contract.ensure_valid_keys` (@grzegorz-jakubiak)
|
43
|
+
- [internal] fixed keyword warnings on MRI 2.7.0 (@flash-gordon)
|
44
|
+
|
45
|
+
[Compare v1.3.1...v1.4.0](https://github.com/dry-rb/dry-validation/compare/v1.3.1...v1.4.0)
|
46
|
+
|
47
|
+
## 1.3.1 2019-08-16
|
48
|
+
|
49
|
+
|
50
|
+
### Changed
|
51
|
+
|
52
|
+
- You can now set an external schema without providing a block (@alassek)
|
53
|
+
|
54
|
+
[Compare v1.3.0...v1.3.1](https://github.com/dry-rb/dry-validation/compare/v1.3.0...v1.3.1)
|
55
|
+
|
56
|
+
## 1.3.0 2019-08-14
|
57
|
+
|
58
|
+
|
59
|
+
### Added
|
60
|
+
|
61
|
+
- Support for setting an external schema (that can be extended too) (fixed #574) (@solnic)
|
2
62
|
|
3
63
|
### Fixed
|
4
64
|
|
5
|
-
|
6
|
-
* Removed ugly workaround for template evaluation with extra tokens (solnic)
|
65
|
+
- Using a hash spec to define rule keys with more than one value is properly handled by rule guard now (fixed #576) (@solnic)
|
7
66
|
|
8
67
|
### Changed
|
9
68
|
|
10
|
-
|
69
|
+
- `values` within rules uses `Hash#fetch_values` internally now, which improves performance (@esparta)
|
70
|
+
|
71
|
+
[Compare v1.2.1...v1.3.0](https://github.com/dry-rb/dry-validation/compare/v1.2.1...v1.3.0)
|
72
|
+
|
73
|
+
## 1.2.1 2019-07-16
|
74
|
+
|
75
|
+
|
76
|
+
### Fixed
|
77
|
+
|
78
|
+
- Defining an abstract contract class that has no schema no longer crashes (issue #565) (@solnic)
|
79
|
+
- Fixed an issue where `Rule#each` would crash when the value is not an array (issue #567) (@solnic)
|
80
|
+
- Fixed an issue where guarding a rule would crash when keys are missing in the input (issue #569) (@solnic)
|
81
|
+
- Added missing "pathname" require (issue #570) (@solnic)
|
82
|
+
|
83
|
+
|
84
|
+
[Compare v1.2.0...v1.2.1](https://github.com/dry-rb/dry-validation/compare/v1.2.0...v1.2.1)
|
85
|
+
|
86
|
+
## 1.2.0 2019-07-08
|
87
|
+
|
88
|
+
|
89
|
+
### Added
|
90
|
+
|
91
|
+
- New extension `:predicates_as_macros` (@waiting-for-dev)
|
92
|
+
|
93
|
+
### Fixed
|
94
|
+
|
95
|
+
- Guarding rules for nested keys works correctly (issue #560) (@solnic)
|
96
|
+
|
97
|
+
### Changed
|
98
|
+
|
99
|
+
- `dry-schema` dependency was bumped to `>= 1.3.1` (@solnic)
|
100
|
+
|
101
|
+
[Compare v1.1.1...v1.2.0](https://github.com/dry-rb/dry-validation/compare/v1.1.1...v1.2.0)
|
102
|
+
|
103
|
+
## 1.1.1 2019-06-24
|
104
|
+
|
105
|
+
|
106
|
+
### Fixed
|
107
|
+
|
108
|
+
- `Rule#each` works with array values from nested hashes (@mustardnoise)
|
109
|
+
|
110
|
+
|
111
|
+
[Compare v1.1.0...v1.1.1](https://github.com/dry-rb/dry-validation/compare/v1.1.0...v1.1.1)
|
11
112
|
|
12
|
-
|
113
|
+
## 1.1.0 2019-06-14
|
13
114
|
|
14
|
-
|
115
|
+
|
116
|
+
### Added
|
117
|
+
|
118
|
+
- `key?` method available within rules, that can be used to check if there's a value under the rule's default key (refs #540) (@solnic)
|
119
|
+
- `value` supports hash-based path specifications now (refs #547) (@solnic)
|
120
|
+
- `value` can read multiple values when the key points to them, ie in case of `rule(geo: [:lat, :lon])` it would return an array with `lat` and `lon` (@solnic)
|
15
121
|
|
16
122
|
### Fixed
|
17
123
|
|
18
|
-
|
124
|
+
- Passing multiple macro names to `validate` or `each` works correctly (fixed #538 #541) (@jandudulski)
|
125
|
+
|
19
126
|
|
20
|
-
[Compare
|
127
|
+
[Compare v1.0.0...v1.1.0](https://github.com/dry-rb/dry-validation/compare/v1.0.0...v1.1.0)
|
128
|
+
|
129
|
+
## 1.0.0 2019-06-10
|
130
|
+
|
131
|
+
See [the list of all addressed issues](https://github.com/dry-rb/dry-validation/issues?utf8=✓&q=is%3Aissue+is%3Aclosed+closed%3A%3E%3D2019-01-01+) as well as issues that were moved to dry-schema and [addressed there](https://github.com/dry-rb/dry-schema/issues?q=is%3Aissue+is%3Aclosed+dry-validation+milestone%3A1.0.0).
|
132
|
+
|
133
|
+
|
134
|
+
[Compare v1.0.0...v1.0.0](https://github.com/dry-rb/dry-validation/compare/v1.0.0...v1.0.0)
|
135
|
+
|
136
|
+
## 1.0.0 2019-06-10
|
137
|
+
|
138
|
+
|
139
|
+
### Added
|
21
140
|
|
22
|
-
|
141
|
+
- Support for defining rules for each element of an array via `rule(:items).each { ... }` (solnic)
|
142
|
+
- Support for parameterized macros via `rule(:foo).validate(my_macro: :some_option)` (solnic)
|
143
|
+
- `values#[]` is now compatible with path specs (symbol, array with keys or dot-notation) (issue #528) (solnic)
|
144
|
+
- `value` shortcut for accessing the value found under the first key specified by a rule. ie `rule(:foo) { value }` returns `values[:foo]` (solnic)
|
145
|
+
|
146
|
+
### Fixed
|
147
|
+
|
148
|
+
- Contract's `config.locale` option was replaced by `config.messages.default_locale` to avoid conflicts with run-time `:locale` option and/or whatever is set via `I18n` gem (solnic)
|
149
|
+
- Macros no longer mutate `Dry::Validation::Contract.macros` when using inheritance (solnic)
|
150
|
+
- Missing dependency on `dry-container` was added (solnic)
|
23
151
|
|
24
152
|
### Changed
|
25
153
|
|
26
|
-
- `
|
154
|
+
- `rule` will raise `InvalidKeysError` when specified keys are not defined by the schema (solnic)
|
155
|
+
- `Contract.new` will raise `SchemaMissingError` when the class doesn't have schema defined (solnic)
|
156
|
+
- Contracts no longer support `:locale` option in the constructor. Use `Result#errors(locale: :pl)` to change locale at run-time (solnic)
|
157
|
+
|
158
|
+
[Compare v1.0.0.rc3...v1.0.0](https://github.com/dry-rb/dry-validation/compare/v1.0.0.rc3...v1.0.0)
|
159
|
+
|
160
|
+
## 1.0.0.rc3 2019-05-06
|
161
|
+
|
162
|
+
|
163
|
+
### Added
|
164
|
+
|
165
|
+
- [EXPERIMENTAL] `Validation.register_macro` for registering global macros (solnic)
|
166
|
+
- [EXPERIMENTAL] `Contract.register_macro` for registering macros available to specific contract classes (solnic)
|
167
|
+
- `Dry::Validation.Contract` shortcut for quickly defining a contract and getting its instance back (solnic)
|
168
|
+
- New configuration option `config.locale` for setting the default locale (solnic)
|
169
|
+
|
170
|
+
### Fixed
|
171
|
+
|
172
|
+
- `config/errors.yml` are now bundled with the gem, **`rc2` was broken because of this** (solnic)
|
173
|
+
|
174
|
+
|
175
|
+
[Compare v1.0.0.rc2...v1.0.0.rc3](https://github.com/dry-rb/dry-validation/compare/v1.0.0.rc2...v1.0.0.rc3)
|
176
|
+
|
177
|
+
## 1.0.0.rc2 2019-05-04
|
27
178
|
|
28
|
-
|
179
|
+
This was **yanked** on rubygems.org because the bundled gem was missing `config` directory, thus it was not possible to require it. It was fixed in `rc3`.
|
29
180
|
|
30
|
-
|
181
|
+
### Added
|
182
|
+
|
183
|
+
- [EXPERIMENTAL] support for registering macros via `Dry::Validation::Macros.register(:your_macro, &block)` (solnic)
|
184
|
+
- [EXPERIMENTAL] `:acceptance` as the first built-in macro (issue #157) (solnic)
|
185
|
+
|
186
|
+
### Fixed
|
187
|
+
|
188
|
+
- Passing invalid argument to `failure` will raise a meaningful error instead of crashing (solnic)
|
31
189
|
|
32
190
|
### Changed
|
33
191
|
|
34
|
-
- `
|
35
|
-
- `dry-
|
192
|
+
- In rule validation blocks, `values` is now an instance of a hash-like `Dry::Validation::Values` class, rather than `Dry::Schema::Result`. This gives more convenient access to data within rules (solnic)
|
193
|
+
- Dependency on `dry-schema` was updated to `~> 1.0` (solnic)
|
194
|
+
|
195
|
+
[Compare v1.0.0.rc1...v1.0.0.rc2](https://github.com/dry-rb/dry-validation/compare/v1.0.0.rc1...v1.0.0.rc2)
|
196
|
+
|
197
|
+
## 1.0.0.rc1 2019-04-26
|
198
|
+
|
199
|
+
|
200
|
+
### Added
|
201
|
+
|
202
|
+
- `:hints` extension is back (solnic)
|
203
|
+
- `Result` objects have access to the context object which is shared between rules (flash-gordon)
|
204
|
+
|
205
|
+
### Fixed
|
206
|
+
|
207
|
+
- Multiple hint messages no longer crash message set (flash-gordon)
|
208
|
+
- `Contract#inspect` no longer crashes (solnic)
|
209
|
+
|
210
|
+
### Changed
|
211
|
+
|
212
|
+
- Dependency on `dry-schema` was bumped to `~> 0.6` - this pulls in `dry-types 1.0.0` and `dry-logic 1.0.0` (solnic)
|
213
|
+
- Dependency on `dry-initializer` was bumped to `~> 3.0` (solnic)
|
214
|
+
|
215
|
+
[Compare v1.0.0.beta2...v1.0.0.rc1](https://github.com/dry-rb/dry-validation/compare/v1.0.0.beta2...v1.0.0.rc1)
|
216
|
+
|
217
|
+
## 1.0.0.beta2 2019-04-04
|
218
|
+
|
219
|
+
|
220
|
+
### Added
|
221
|
+
|
222
|
+
- Support for arbitrary meta-data in failures, ie:
|
223
|
+
|
224
|
+
```ruby
|
225
|
+
class NewUserContract < Dry::Validation::Contract
|
226
|
+
params do
|
227
|
+
required(:login).filled(:string)
|
228
|
+
end
|
229
|
+
|
230
|
+
rule(:login) do
|
231
|
+
key.failure(text: 'is taken', code: 123) unless db.unique?(values[:login])
|
232
|
+
end
|
233
|
+
end
|
234
|
+
```
|
235
|
+
|
236
|
+
Now your error hash will include `{ login: [{ text: 'is taken', code: 123 }] }` (solnic + flash-gordon)
|
237
|
+
|
238
|
+
### Changed
|
239
|
+
|
240
|
+
- [BREAKING] `Error` was renamed to `Message` as it is a more generic concept (solnic)
|
241
|
+
- [BREAKING] `ErrorSet` was renamed to `MessageSet` for consistency (solnic)
|
242
|
+
- [BREAKING] `:monads` extension wraps entire result objects in `Success` or `Failure` (flash-gordon)
|
243
|
+
|
244
|
+
[Compare v1.0.0.beta1...v1.0.0.beta2](https://github.com/dry-rb/dry-validation/compare/v1.0.0.beta1...v1.0.0.beta2)
|
245
|
+
|
246
|
+
## 1.0.0.beta1 2019-03-26
|
247
|
+
|
248
|
+
|
249
|
+
### Added
|
250
|
+
|
251
|
+
- New API for setting failures `base.failure` for base errors and `key.failure` for key errors (solnic)
|
252
|
+
- Support for `base` errors associated with a key even when child keys have errors too (solnic)
|
253
|
+
- Support for `base` errors not associated with any key (solnic)
|
254
|
+
- Result objects use `ErrorSet` object now for managing messages (solnic)
|
255
|
+
- Nested keys are properly handled when generating messages hash (issue #489) (flash-gordon + solnic)
|
256
|
+
- Result objects support `locale` and `full` options now (solnic)
|
257
|
+
- Ability to configure `top_namespace` for messages, which will be used for both schema and rule localization (solnic)
|
258
|
+
- Rule blocks receive a context object that you can use to share data between rules (solnic)
|
259
|
+
|
260
|
+
### Changed
|
261
|
+
|
262
|
+
- [BREAKING] `Result#errors` returns an instance of `ErrorSet` now, it's an enumerable, coerible to a hash (solnic)
|
263
|
+
- [BREAKING] `failure` was removed in favor of `key.failure` or `key(:foo).failure` (solnic)
|
264
|
+
- [BREAKING] `Result#to_hash` was removed (flash-gordon)
|
265
|
+
|
266
|
+
[Compare v1.0.0.alpha2...v1.0.0.beta1](https://github.com/dry-rb/dry-validation/compare/v1.0.0.alpha2...v1.0.0.beta1)
|
267
|
+
|
268
|
+
## 1.0.0.alpha2 2019-03-05
|
269
|
+
|
270
|
+
First round of bug fixes. Thanks for testing <3!
|
271
|
+
|
272
|
+
### Fixed
|
273
|
+
|
274
|
+
- Errors with nested messages are correctly built (flash-gordon)
|
275
|
+
- Messages for nested keys are correctly resolved (solnic)
|
276
|
+
- A message for a nested key is resolved when it's defined under `errors.rule.%{key}` too, but a message under nested key will override it (solnic)
|
277
|
+
|
278
|
+
### Changed
|
279
|
+
|
280
|
+
- When a message template is not found a more meaningful error is raised that includes both rule identifier and key path (solnic)
|
281
|
+
|
282
|
+
[Compare v1.0.0.alpha1...v1.0.0.alpha2](https://github.com/dry-rb/dry-validation/compare/v1.0.0.alpha1...v1.0.0.alpha2)
|
283
|
+
|
284
|
+
## 1.0.0.alpha1 2019-03-04
|
285
|
+
|
286
|
+
Complete rewrite on top of `dry-schema`.
|
287
|
+
|
288
|
+
### Added
|
289
|
+
|
290
|
+
- [BREAKING] `Dry::Validation::Contract` as a replacement for validation schemas (solnic)
|
291
|
+
- [BREAKING] New `rule` DSL with an improved API for setting error messages (solnic)
|
292
|
+
|
293
|
+
|
294
|
+
[Compare v0.13.0...v1.0.0.alpha1](https://github.com/dry-rb/dry-validation/compare/v0.13.0...v1.0.0.alpha1)
|
295
|
+
|
296
|
+
## 0.13.0 2019-01-29
|
297
|
+
|
36
298
|
|
37
299
|
### Fixed
|
38
300
|
|
39
301
|
- Warning about method redefined (amatsuda)
|
40
302
|
|
41
|
-
|
303
|
+
### Changed
|
304
|
+
|
305
|
+
- `dry-logic` was bumped to `~> 0.5` (solnic)
|
306
|
+
- `dry-types` was bumped to `~> 0.14` (solnic)
|
307
|
+
|
308
|
+
[Compare v0.12.3...v0.13.0](https://github.com/dry-rb/dry-validation/compare/v0.12.3...v0.13.0)
|
309
|
+
|
310
|
+
## 0.12.3 2019-01-29
|
311
|
+
|
312
|
+
|
313
|
+
### Changed
|
314
|
+
|
315
|
+
- [internal] dry-logic was pinned to `~> 0.4.2` (flash-gordon)
|
316
|
+
|
317
|
+
[Compare v0.12.2...v0.12.3](https://github.com/dry-rb/dry-validation/compare/v0.12.2...v0.12.3)
|
318
|
+
|
319
|
+
## 0.12.2 2018-08-29
|
42
320
|
|
43
|
-
# v0.12.2 2018-08-29
|
44
321
|
|
45
322
|
### Fixed
|
46
323
|
|
47
324
|
- Use correct key names for rule messages when using i18n (jozzi05)
|
48
325
|
|
326
|
+
|
49
327
|
[Compare v0.12.1...v0.12.2](https://github.com/dry-rb/dry-validation/compare/v0.12.1...v0.12.2)
|
50
328
|
|
51
|
-
|
329
|
+
## 0.12.1 2018-07-06
|
330
|
+
|
52
331
|
|
53
332
|
### Fixed
|
54
333
|
|
55
334
|
- [internal] fixed deprecation warnings (flash-gordon)
|
56
335
|
|
336
|
+
|
57
337
|
[Compare v0.12.0...v0.12.1](https://github.com/dry-rb/dry-validation/compare/v0.12.0...v0.12.1)
|
58
338
|
|
59
|
-
|
339
|
+
## 0.12.0 2018-05-31
|
340
|
+
|
60
341
|
|
61
342
|
### Changed
|
62
343
|
|
@@ -65,7 +346,8 @@
|
|
65
346
|
|
66
347
|
[Compare v0.11.1...v0.12.0](https://github.com/dry-rb/dry-validation/compare/v0.11.1...v0.12.0)
|
67
348
|
|
68
|
-
|
349
|
+
## 0.11.1 2017-09-15
|
350
|
+
|
69
351
|
|
70
352
|
### Changed
|
71
353
|
|
@@ -74,7 +356,8 @@
|
|
74
356
|
|
75
357
|
[Compare v0.11.0...v0.11.1](https://github.com/dry-rb/dry-validation/compare/v0.11.0...v0.11.1)
|
76
358
|
|
77
|
-
|
359
|
+
## 0.11.0 2017-05-30
|
360
|
+
|
78
361
|
|
79
362
|
### Changed
|
80
363
|
|
@@ -82,32 +365,39 @@
|
|
82
365
|
|
83
366
|
[Compare v0.10.7...v0.11.0](https://github.com/dry-rb/dry-validation/compare/v0.10.7...v0.11.0)
|
84
367
|
|
85
|
-
|
368
|
+
## 0.10.7 2017-05-15
|
369
|
+
|
86
370
|
|
87
371
|
### Fixed
|
88
372
|
|
89
373
|
- `validate` can now be defined multiple times for the same key (kimquy)
|
90
374
|
- Re-using rules between schemas no longer mutates original rule set (pabloh)
|
91
375
|
|
376
|
+
|
92
377
|
[Compare v0.10.6...v0.10.7](https://github.com/dry-rb/dry-validation/compare/v0.10.6...v0.10.7)
|
93
378
|
|
94
|
-
|
379
|
+
## 0.10.6 2017-04-26
|
380
|
+
|
95
381
|
|
96
382
|
### Fixed
|
97
383
|
|
98
384
|
- Fixes issue with wrong localized error messages when namespaced messages are used (kbredemeier)
|
99
385
|
|
386
|
+
|
100
387
|
[Compare v0.10.5...v0.10.6](https://github.com/dry-rb/dry-validation/compare/v0.10.5...v0.10.6)
|
101
388
|
|
102
|
-
|
389
|
+
## 0.10.5 2017-01-12
|
390
|
+
|
103
391
|
|
104
392
|
### Fixed
|
105
393
|
|
106
394
|
- Warnings under MRI 2.4.0 are gone (koic)
|
107
395
|
|
396
|
+
|
108
397
|
[Compare v0.10.4...v0.10.5](https://github.com/dry-rb/dry-validation/compare/v0.10.4...v0.10.5)
|
109
398
|
|
110
|
-
|
399
|
+
## 0.10.4 2016-12-03
|
400
|
+
|
111
401
|
|
112
402
|
### Fixed
|
113
403
|
|
@@ -120,31 +410,38 @@
|
|
120
410
|
|
121
411
|
[Compare v0.10.3...v0.10.4](https://github.com/dry-rb/dry-validation/compare/v0.10.3...v0.10.4)
|
122
412
|
|
123
|
-
|
413
|
+
## 0.10.3 2016-09-27
|
414
|
+
|
124
415
|
|
125
416
|
### Fixed
|
126
417
|
|
127
418
|
- Custom predicates work correctly with `each` macro (solnic)
|
128
419
|
|
420
|
+
|
129
421
|
[Compare v0.10.2...v0.10.3](https://github.com/dry-rb/dry-validation/compare/v0.10.2...v0.10.3)
|
130
422
|
|
131
|
-
|
423
|
+
## 0.10.2 2016-09-23
|
424
|
+
|
132
425
|
|
133
426
|
### Fixed
|
134
427
|
|
135
428
|
- Constrained types + hints work again (solnic)
|
136
429
|
|
430
|
+
|
137
431
|
[Compare v0.10.1...v0.10.2](https://github.com/dry-rb/dry-validation/compare/v0.10.1...v0.10.2)
|
138
432
|
|
139
|
-
|
433
|
+
## 0.10.1 2016-09-22
|
434
|
+
|
140
435
|
|
141
436
|
### Fixed
|
142
437
|
|
143
438
|
- Remove obsolete require of `dry/struct` which is now an optional extension (flash-gordon)
|
144
439
|
|
440
|
+
|
145
441
|
[Compare v0.10.0...v0.10.1](https://github.com/dry-rb/dry-validation/compare/v0.10.0...v0.10.1)
|
146
442
|
|
147
|
-
|
443
|
+
## 0.10.0 2016-09-21
|
444
|
+
|
148
445
|
|
149
446
|
### Added
|
150
447
|
|
@@ -167,34 +464,31 @@
|
|
167
464
|
- [BREAKING] `when` macro no longer supports multiple disconnected rules in its block, whatever the block returns will be used for the implication (solnic)
|
168
465
|
- [BREAKING] `rule(some_name: %i(some keys))` will _always_ use `:some_name` as the key for failure messages (solnic)
|
169
466
|
|
170
|
-
### Internal
|
171
|
-
|
172
|
-
- ~2 x performance boost (solnic)
|
173
|
-
- Rule AST was updated to latest dry-logic (solnic)
|
174
|
-
- `MessageCompiler` was drastically simplified based on the new result AST from dry-logic (solnic)
|
175
|
-
- `HintCompiler` is gone as hints are now part of the result AST (solnic)
|
176
|
-
- `maybe` macro creates an implication instead of a disjunction (`not(none?).then(*your-predicates)`) (solnic)
|
177
|
-
|
178
467
|
[Compare v0.9.5...v0.10.0](https://github.com/dry-rb/dry-validation/compare/v0.9.5...v0.10.0)
|
179
468
|
|
180
|
-
|
469
|
+
## 0.9.5 2016-08-16
|
470
|
+
|
181
471
|
|
182
472
|
### Fixed
|
183
473
|
|
184
474
|
- Infering multiple predicates with options works as expected ie `value(:str?, min_size?: 3, max_size?: 6)` (solnic)
|
185
475
|
- Default `locale` configured in `I18n` is now respected by the messages compiler (agustin + cavi21)
|
186
476
|
|
477
|
+
|
187
478
|
[Compare v0.9.4...v0.9.5](https://github.com/dry-rb/dry-validation/compare/v0.9.4...v0.9.5)
|
188
479
|
|
189
|
-
|
480
|
+
## 0.9.4 2016-08-11
|
481
|
+
|
190
482
|
|
191
483
|
### Fixed
|
192
484
|
|
193
485
|
- Error messages for sibling deeply nested schemas are nested correctly (timriley)
|
194
486
|
|
487
|
+
|
195
488
|
[Compare v0.9.3...v0.9.4](https://github.com/dry-rb/dry-validation/compare/v0.9.3...v0.9.4)
|
196
489
|
|
197
|
-
|
490
|
+
## 0.9.3 2016-07-22
|
491
|
+
|
198
492
|
|
199
493
|
### Added
|
200
494
|
|
@@ -212,24 +506,29 @@
|
|
212
506
|
|
213
507
|
[Compare v0.9.2...v0.9.3](https://github.com/dry-rb/dry-validation/compare/v0.9.2...v0.9.3)
|
214
508
|
|
215
|
-
|
509
|
+
## 0.9.2 2016-07-13
|
510
|
+
|
216
511
|
|
217
512
|
### Fixed
|
218
513
|
|
219
514
|
- Constrained types now work with `each` macro (solnic)
|
220
515
|
- Array coercion without member type works now ie `required(:arr).maybe(:array?)` (solnic)
|
221
516
|
|
517
|
+
|
222
518
|
[Compare v0.9.1...v0.9.2](https://github.com/dry-rb/dry-validation/compare/v0.9.1...v0.9.2)
|
223
519
|
|
224
|
-
|
520
|
+
## 0.9.1 2016-07-11
|
521
|
+
|
225
522
|
|
226
523
|
### Fixed
|
227
524
|
|
228
525
|
- `I18n` backend is no longer required and set by default (solnic)
|
229
526
|
|
527
|
+
|
230
528
|
[Compare v0.9.0...v0.9.1](https://github.com/dry-rb/dry-validation/compare/v0.9.0...v0.9.1)
|
231
529
|
|
232
|
-
|
530
|
+
## 0.9.0 2016-07-08
|
531
|
+
|
233
532
|
|
234
533
|
### Added
|
235
534
|
|
@@ -242,10 +541,6 @@
|
|
242
541
|
- Support for message token transformations in custom predicates (fran-worley)
|
243
542
|
- [EXPERIMENTAL] Ability to compose predicates that accept dynamic args provided by the schema (solnic)
|
244
543
|
|
245
|
-
### Changed
|
246
|
-
|
247
|
-
- Tokens for `size?` were renamed `left` => `size_left` and `right` => `size_right` (fran-worley)
|
248
|
-
|
249
544
|
### Fixed
|
250
545
|
|
251
546
|
- Duped key names in nested schemas no longer result in invalid error messages structure (solnic)
|
@@ -255,18 +550,14 @@
|
|
255
550
|
- Hints for elements are no longer provided for an array when the value is not an array (solnic)
|
256
551
|
- `input` macro no longer messes up error messages for nested structures (solnic)
|
257
552
|
|
258
|
-
###
|
553
|
+
### Changed
|
259
554
|
|
260
|
-
-
|
261
|
-
- Refactored Error and Hint compilers (solnic)
|
262
|
-
- Refactored Schema to use an internal executor objects with steps (solnic)
|
263
|
-
- Extracted root-rule into a separate validation step (solnic)
|
264
|
-
- Added `MessageSet` that result objects now use (in 1.0.0 it'll be exposed via public API) (solnic)
|
265
|
-
- We can now distinguish error messages from validation hints via `Message` and `Hint` objects (solnic)
|
555
|
+
- Tokens for `size?` were renamed `left` => `size_left` and `right` => `size_right` (fran-worley)
|
266
556
|
|
267
557
|
[Compare v0.8.0...v0.9.0](https://github.com/dry-rb/dry-validation/compare/v0.8.0...v0.9.0)
|
268
558
|
|
269
|
-
|
559
|
+
## 0.8.0 2016-07-01
|
560
|
+
|
270
561
|
|
271
562
|
### Added
|
272
563
|
|
@@ -312,19 +603,10 @@
|
|
312
603
|
- Deprecate key in favor of required (coop)
|
313
604
|
- Remove nested key syntax (solnic)
|
314
605
|
|
315
|
-
### Internal
|
316
|
-
|
317
|
-
- ~15% performance boost via various optimizations (solnic)
|
318
|
-
- When using explicit type specs building a schema is ~80-85x faster (solnic)
|
319
|
-
- No longer uses `Dry::Types::Predicates` as `:type?` predicate was moved to dry-logic (solnic)
|
320
|
-
- Integration specs covering predicates with Form and Schema (jodosha)
|
321
|
-
- Use latest ruby versions on travis (flash-gordon)
|
322
|
-
- Make pry console optional with IRB as a default (flash-gordon)
|
323
|
-
- Remove wrapping rules in :set nodes (solnic)
|
324
|
-
|
325
606
|
[Compare v0.7.4...v0.8.0](https://github.com/dry-rb/dry-validation/compare/v0.7.4...v0.8.0)
|
326
607
|
|
327
|
-
|
608
|
+
## 0.7.4 2016-04-06
|
609
|
+
|
328
610
|
|
329
611
|
### Added
|
330
612
|
|
@@ -335,9 +617,11 @@
|
|
335
617
|
|
336
618
|
- Depending on deeply nested values in high-level rules works now (solnic)
|
337
619
|
|
620
|
+
|
338
621
|
[Compare v0.7.3...v0.7.4](https://github.com/dry-rb/dry-validation/compare/v0.7.3...v0.7.4)
|
339
622
|
|
340
|
-
|
623
|
+
## 0.7.3 2016-03-30
|
624
|
+
|
341
625
|
|
342
626
|
### Added
|
343
627
|
|
@@ -350,22 +634,22 @@
|
|
350
634
|
- Creating a nested schema properly sets full path to nested data structure (solnic)
|
351
635
|
- Error message for `empty?` predicate is now correct (jodosha)
|
352
636
|
|
353
|
-
### Internal
|
354
|
-
|
355
|
-
- Switch from `thread_safe` to `concurrent` (joevandyk)
|
356
637
|
|
357
638
|
[Compare v0.7.2...v0.7.3](https://github.com/dry-rb/dry-validation/compare/v0.7.2...v0.7.3)
|
358
639
|
|
359
|
-
|
640
|
+
## 0.7.2 2016-03-28
|
641
|
+
|
360
642
|
|
361
643
|
### Added
|
362
644
|
|
363
645
|
- Support for nested schemas inside high-level rules (solnic)
|
364
646
|
- `Schema#to_proc` so that you can do `data.each(&schema)` (solnic)
|
365
647
|
|
648
|
+
|
366
649
|
[Compare v0.7.1...v0.7.2](https://github.com/dry-rb/dry-validation/compare/v0.7.1...v0.7.2)
|
367
650
|
|
368
|
-
|
651
|
+
## 0.7.1 2016-03-21
|
652
|
+
|
369
653
|
|
370
654
|
### Added
|
371
655
|
|
@@ -383,7 +667,8 @@
|
|
383
667
|
|
384
668
|
[Compare v0.7.0...v0.7.1](https://github.com/dry-rb/dry-validation/compare/v0.7.0...v0.7.1)
|
385
669
|
|
386
|
-
|
670
|
+
## 0.7.0 2016-03-16
|
671
|
+
|
387
672
|
|
388
673
|
### Added
|
389
674
|
|
@@ -407,6 +692,12 @@
|
|
407
692
|
- `Validation::Result` responds to `#[]` and `#each` (delegating to its output)
|
408
693
|
and it's an enumerable (solnic)
|
409
694
|
|
695
|
+
### Fixed
|
696
|
+
|
697
|
+
- Qualified rule names properly use last node by default for error messages (solnic)
|
698
|
+
- Validation hints only include relevant messages (solnic)
|
699
|
+
- `:yaml` messages respect `:locale` option in `Result#messages` (solnic)
|
700
|
+
|
410
701
|
### Changed
|
411
702
|
|
412
703
|
- `schema` was **removed** from the DSL, just use `key(:name).schema` instead (solnic)
|
@@ -417,15 +708,10 @@
|
|
417
708
|
- `Schema::Result` is now `Validation::Result` and it no longer has success and
|
418
709
|
failure results, only error results are provided (solnic)
|
419
710
|
|
420
|
-
### Fixed
|
421
|
-
|
422
|
-
- Qualified rule names properly use last node by default for error messages (solnic)
|
423
|
-
- Validation hints only include relevant messages (solnic)
|
424
|
-
- `:yaml` messages respect `:locale` option in `Result#messages` (solnic)
|
425
|
-
|
426
711
|
[Compare v0.6.0...v0.7.0](https://github.com/dry-rb/dry-validation/compare/v0.6.0...v0.7.0)
|
427
712
|
|
428
|
-
|
713
|
+
## 0.6.0 2016-01-20
|
714
|
+
|
429
715
|
|
430
716
|
### Added
|
431
717
|
|
@@ -436,38 +722,41 @@
|
|
436
722
|
- Support for `confirmation(:foo, some_predicate: some_argument)` shortcut syntax (solnic)
|
437
723
|
- Support for error messages for grouped rules (like `confirmation`) (solnic)
|
438
724
|
- Schemas support injecting rules from the outside (solnic)
|
439
|
-
|
440
|
-
## Changed
|
441
|
-
|
725
|
+
- ## Changed
|
442
726
|
- `rule` uses objects that inherit from `BasicObject` to avoid conflicts with
|
443
727
|
predicate names and built-in `Object` methods (solnic)
|
444
728
|
- In `Schema::Form` both `key` and `optional` will apply `filled?` predicate by
|
445
729
|
default when no block is passed (solnic)
|
446
730
|
|
447
|
-
[Compare v0.5.0...v0.6.0](https://github.com/dry-rb/dry-validation/compare/v0.5.0...v0.6.0)
|
448
731
|
|
449
|
-
|
732
|
+
[Compare v0.5.0...v0.6.0](https://github.com/dry-rb/dry-validation/compare/v0.5.0...v0.6.0)
|
450
733
|
|
451
|
-
|
734
|
+
## 0.5.0 2016-01-11
|
452
735
|
|
453
|
-
- Now depends on [dry-logic](https://github.com/dry-rb/dry-logic) for predicates and rules (solnic)
|
454
|
-
- `dry/validation/schema/form` is now required by default (solnic)
|
455
736
|
|
456
737
|
### Fixed
|
457
738
|
|
458
739
|
- `Schema::Form` uses safe `form.array` and `form.hash` types which fixes #42 (solnic)
|
459
740
|
|
741
|
+
### Changed
|
742
|
+
|
743
|
+
- Now depends on [dry-logic](https://github.com/dry-rb/dry-logic) for predicates and rules (solnic)
|
744
|
+
- `dry/validation/schema/form` is now required by default (solnic)
|
745
|
+
|
460
746
|
[Compare v0.4.1...v0.5.0](https://github.com/dry-rb/dry-validation/compare/v0.4.1...v0.5.0)
|
461
747
|
|
462
|
-
|
748
|
+
## 0.4.1 2015-12-27
|
749
|
+
|
463
750
|
|
464
751
|
### Added
|
465
752
|
|
466
753
|
- Support for `each` and type coercion inference in `Schema::Form` (solnic)
|
467
754
|
|
755
|
+
|
468
756
|
[Compare v0.4.0...v0.4.1](https://github.com/dry-rb/dry-validation/compare/v0.4.0...v0.4.1)
|
469
757
|
|
470
|
-
|
758
|
+
## 0.4.0 2015-12-21
|
759
|
+
|
471
760
|
|
472
761
|
### Added
|
473
762
|
|
@@ -481,9 +770,11 @@
|
|
481
770
|
|
482
771
|
- Error messages hash has now consistent structure `rule_name => [msgs_array, input_value]` (solnic)
|
483
772
|
|
773
|
+
|
484
774
|
[Compare v0.3.1...v0.4.0](https://github.com/dry-rb/dry-validation/compare/v0.3.1...v0.4.0)
|
485
775
|
|
486
|
-
|
776
|
+
## 0.3.1 2015-12-08
|
777
|
+
|
487
778
|
|
488
779
|
### Added
|
489
780
|
|
@@ -493,9 +784,11 @@
|
|
493
784
|
|
494
785
|
- Error compiler returns an empty hash rather than a nil when there are no errors (solnic)
|
495
786
|
|
787
|
+
|
496
788
|
[Compare v0.3.0...v0.3.1](https://github.com/dry-rb/dry-validation/compare/v0.3.0...v0.3.1)
|
497
789
|
|
498
|
-
|
790
|
+
## 0.3.0 2015-12-07
|
791
|
+
|
499
792
|
|
500
793
|
### Added
|
501
794
|
|
@@ -517,9 +810,10 @@
|
|
517
810
|
errors and messages
|
518
811
|
- `Schema::Result#messages` returns a hash with rule names, messages and input values (solnic)
|
519
812
|
|
520
|
-
[Compare v0.2.0...
|
813
|
+
[Compare v0.2.0...v0.3.0](https://github.com/dry-rb/dry-validation/compare/v0.2.0...v0.3.0)
|
814
|
+
|
815
|
+
## 0.2.0 2015-11-30
|
521
816
|
|
522
|
-
# v0.2.0 2015-11-30
|
523
817
|
|
524
818
|
### Added
|
525
819
|
|
@@ -540,8 +834,9 @@
|
|
540
834
|
|
541
835
|
- Added missing `and` / `or` interfaces to composite rules (solnic)
|
542
836
|
|
543
|
-
[Compare v0.1.0...HEAD](https://github.com/dry-rb/dry-validation/compare/v0.1.0...HEAD)
|
544
837
|
|
545
|
-
|
838
|
+
[Compare v0.1.0...v0.2.0](https://github.com/dry-rb/dry-validation/compare/v0.1.0...v0.2.0)
|
839
|
+
|
840
|
+
## 0.1.0 2015-11-25
|
546
841
|
|
547
842
|
First public release
|