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.
Files changed (206) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +390 -95
  3. data/LICENSE +1 -1
  4. data/README.md +15 -12
  5. data/config/errors.yml +3 -88
  6. data/dry-validation.gemspec +30 -19
  7. data/lib/dry-validation.rb +2 -0
  8. data/lib/dry/validation.rb +47 -28
  9. data/lib/dry/validation/config.rb +24 -0
  10. data/lib/dry/validation/constants.rb +43 -0
  11. data/lib/dry/validation/contract.rb +160 -0
  12. data/lib/dry/validation/contract/class_interface.rb +222 -0
  13. data/lib/dry/validation/evaluator.rb +198 -0
  14. data/lib/dry/validation/extensions/hints.rb +69 -0
  15. data/lib/dry/validation/extensions/monads.rb +23 -7
  16. data/lib/dry/validation/extensions/predicates_as_macros.rb +75 -0
  17. data/lib/dry/validation/failures.rb +65 -0
  18. data/lib/dry/validation/function.rb +44 -0
  19. data/lib/dry/validation/macro.rb +38 -0
  20. data/lib/dry/validation/macros.rb +104 -0
  21. data/lib/dry/validation/message.rb +79 -79
  22. data/lib/dry/validation/message_set.rb +109 -88
  23. data/lib/dry/validation/messages/resolver.rb +106 -0
  24. data/lib/dry/validation/result.rb +168 -40
  25. data/lib/dry/validation/rule.rb +135 -0
  26. data/lib/dry/validation/schema_ext.rb +46 -0
  27. data/lib/dry/validation/values.rb +95 -0
  28. data/lib/dry/validation/version.rb +3 -1
  29. metadata +45 -335
  30. data/.codeclimate.yml +0 -17
  31. data/.gitignore +0 -9
  32. data/.rspec +0 -3
  33. data/.travis.yml +0 -29
  34. data/CONTRIBUTING.md +0 -31
  35. data/Gemfile +0 -25
  36. data/Rakefile +0 -22
  37. data/benchmarks/benchmark_form_invalid.rb +0 -64
  38. data/benchmarks/benchmark_form_valid.rb +0 -64
  39. data/benchmarks/benchmark_schema_invalid_huge.rb +0 -52
  40. data/benchmarks/profile_schema_call_invalid.rb +0 -20
  41. data/benchmarks/profile_schema_call_valid.rb +0 -20
  42. data/benchmarks/profile_schema_definition.rb +0 -14
  43. data/benchmarks/profile_schema_huge_invalid.rb +0 -30
  44. data/benchmarks/profile_schema_messages_invalid.rb +0 -20
  45. data/benchmarks/suite.rb +0 -5
  46. data/examples/basic.rb +0 -15
  47. data/examples/each.rb +0 -14
  48. data/examples/json.rb +0 -12
  49. data/examples/multiple.rb +0 -27
  50. data/examples/nested.rb +0 -22
  51. data/examples/params.rb +0 -11
  52. data/lib/dry/validation/compat/form.rb +0 -67
  53. data/lib/dry/validation/deprecations.rb +0 -24
  54. data/lib/dry/validation/executor.rb +0 -91
  55. data/lib/dry/validation/extensions.rb +0 -7
  56. data/lib/dry/validation/extensions/struct.rb +0 -32
  57. data/lib/dry/validation/input_processor_compiler.rb +0 -137
  58. data/lib/dry/validation/input_processor_compiler/json.rb +0 -45
  59. data/lib/dry/validation/input_processor_compiler/params.rb +0 -49
  60. data/lib/dry/validation/input_processor_compiler/sanitizer.rb +0 -47
  61. data/lib/dry/validation/message_compiler.rb +0 -188
  62. data/lib/dry/validation/message_compiler/visitor_opts.rb +0 -37
  63. data/lib/dry/validation/messages.rb +0 -14
  64. data/lib/dry/validation/messages/abstract.rb +0 -119
  65. data/lib/dry/validation/messages/i18n.rb +0 -47
  66. data/lib/dry/validation/messages/namespaced.rb +0 -39
  67. data/lib/dry/validation/messages/yaml.rb +0 -61
  68. data/lib/dry/validation/predicate_registry.rb +0 -115
  69. data/lib/dry/validation/predicates.rb +0 -19
  70. data/lib/dry/validation/schema.rb +0 -126
  71. data/lib/dry/validation/schema/check.rb +0 -37
  72. data/lib/dry/validation/schema/class_interface.rb +0 -190
  73. data/lib/dry/validation/schema/deprecated.rb +0 -30
  74. data/lib/dry/validation/schema/dsl.rb +0 -118
  75. data/lib/dry/validation/schema/form.rb +0 -9
  76. data/lib/dry/validation/schema/json.rb +0 -21
  77. data/lib/dry/validation/schema/key.rb +0 -71
  78. data/lib/dry/validation/schema/params.rb +0 -22
  79. data/lib/dry/validation/schema/rule.rb +0 -202
  80. data/lib/dry/validation/schema/value.rb +0 -211
  81. data/lib/dry/validation/schema_compiler.rb +0 -81
  82. data/lib/dry/validation/template.rb +0 -66
  83. data/lib/dry/validation/type_specs.rb +0 -70
  84. data/spec/extensions/monads/result_spec.rb +0 -40
  85. data/spec/extensions/struct/schema_spec.rb +0 -32
  86. data/spec/fixtures/locales/en.yml +0 -8
  87. data/spec/fixtures/locales/pl.yml +0 -22
  88. data/spec/integration/custom_error_messages_spec.rb +0 -54
  89. data/spec/integration/custom_predicates_spec.rb +0 -228
  90. data/spec/integration/hints_spec.rb +0 -170
  91. data/spec/integration/injecting_rules_spec.rb +0 -30
  92. data/spec/integration/json/defining_base_schema_spec.rb +0 -41
  93. data/spec/integration/localized_error_messages_spec.rb +0 -72
  94. data/spec/integration/message_compiler_spec.rb +0 -405
  95. data/spec/integration/messages/i18n_spec.rb +0 -104
  96. data/spec/integration/optional_keys_spec.rb +0 -28
  97. data/spec/integration/params/predicates/array_spec.rb +0 -287
  98. data/spec/integration/params/predicates/empty_spec.rb +0 -263
  99. data/spec/integration/params/predicates/eql_spec.rb +0 -327
  100. data/spec/integration/params/predicates/even_spec.rb +0 -455
  101. data/spec/integration/params/predicates/excluded_from_spec.rb +0 -455
  102. data/spec/integration/params/predicates/excludes_spec.rb +0 -391
  103. data/spec/integration/params/predicates/false_spec.rb +0 -455
  104. data/spec/integration/params/predicates/filled_spec.rb +0 -467
  105. data/spec/integration/params/predicates/format_spec.rb +0 -454
  106. data/spec/integration/params/predicates/gt_spec.rb +0 -519
  107. data/spec/integration/params/predicates/gteq_spec.rb +0 -519
  108. data/spec/integration/params/predicates/included_in_spec.rb +0 -455
  109. data/spec/integration/params/predicates/includes_spec.rb +0 -391
  110. data/spec/integration/params/predicates/key_spec.rb +0 -67
  111. data/spec/integration/params/predicates/lt_spec.rb +0 -519
  112. data/spec/integration/params/predicates/lteq_spec.rb +0 -519
  113. data/spec/integration/params/predicates/max_size_spec.rb +0 -391
  114. data/spec/integration/params/predicates/min_size_spec.rb +0 -391
  115. data/spec/integration/params/predicates/none_spec.rb +0 -265
  116. data/spec/integration/params/predicates/not_eql_spec.rb +0 -327
  117. data/spec/integration/params/predicates/odd_spec.rb +0 -455
  118. data/spec/integration/params/predicates/size/fixed_spec.rb +0 -393
  119. data/spec/integration/params/predicates/size/range_spec.rb +0 -396
  120. data/spec/integration/params/predicates/true_spec.rb +0 -455
  121. data/spec/integration/params/predicates/type_spec.rb +0 -391
  122. data/spec/integration/result_spec.rb +0 -81
  123. data/spec/integration/schema/array_schema_spec.rb +0 -59
  124. data/spec/integration/schema/check_rules_spec.rb +0 -119
  125. data/spec/integration/schema/check_with_nested_el_spec.rb +0 -37
  126. data/spec/integration/schema/check_with_nth_el_spec.rb +0 -25
  127. data/spec/integration/schema/default_settings_spec.rb +0 -11
  128. data/spec/integration/schema/defining_base_schema_spec.rb +0 -41
  129. data/spec/integration/schema/dynamic_predicate_args_spec.rb +0 -43
  130. data/spec/integration/schema/each_with_set_spec.rb +0 -70
  131. data/spec/integration/schema/extending_dsl_spec.rb +0 -27
  132. data/spec/integration/schema/form_spec.rb +0 -236
  133. data/spec/integration/schema/hash_schema_spec.rb +0 -47
  134. data/spec/integration/schema/inheriting_schema_spec.rb +0 -31
  135. data/spec/integration/schema/input_processor_spec.rb +0 -46
  136. data/spec/integration/schema/json/explicit_types_spec.rb +0 -157
  137. data/spec/integration/schema/json_spec.rb +0 -163
  138. data/spec/integration/schema/macros/confirmation_spec.rb +0 -35
  139. data/spec/integration/schema/macros/each_spec.rb +0 -268
  140. data/spec/integration/schema/macros/filled_spec.rb +0 -87
  141. data/spec/integration/schema/macros/input_spec.rb +0 -139
  142. data/spec/integration/schema/macros/maybe_spec.rb +0 -99
  143. data/spec/integration/schema/macros/rule_spec.rb +0 -75
  144. data/spec/integration/schema/macros/value_spec.rb +0 -119
  145. data/spec/integration/schema/macros/when_spec.rb +0 -62
  146. data/spec/integration/schema/nested_schemas_spec.rb +0 -236
  147. data/spec/integration/schema/nested_values_spec.rb +0 -46
  148. data/spec/integration/schema/not_spec.rb +0 -34
  149. data/spec/integration/schema/numbers_spec.rb +0 -19
  150. data/spec/integration/schema/option_with_default_spec.rb +0 -64
  151. data/spec/integration/schema/or_spec.rb +0 -87
  152. data/spec/integration/schema/params/defining_base_schema_spec.rb +0 -41
  153. data/spec/integration/schema/params/explicit_types_spec.rb +0 -195
  154. data/spec/integration/schema/params_spec.rb +0 -234
  155. data/spec/integration/schema/predicate_verification_spec.rb +0 -9
  156. data/spec/integration/schema/predicates/array_spec.rb +0 -295
  157. data/spec/integration/schema/predicates/custom_spec.rb +0 -103
  158. data/spec/integration/schema/predicates/empty_spec.rb +0 -263
  159. data/spec/integration/schema/predicates/eql_spec.rb +0 -327
  160. data/spec/integration/schema/predicates/even_spec.rb +0 -455
  161. data/spec/integration/schema/predicates/excluded_from/array_spec.rb +0 -459
  162. data/spec/integration/schema/predicates/excluded_from/range_spec.rb +0 -459
  163. data/spec/integration/schema/predicates/excludes_spec.rb +0 -391
  164. data/spec/integration/schema/predicates/filled_spec.rb +0 -467
  165. data/spec/integration/schema/predicates/format_spec.rb +0 -455
  166. data/spec/integration/schema/predicates/gt_spec.rb +0 -519
  167. data/spec/integration/schema/predicates/gteq_spec.rb +0 -519
  168. data/spec/integration/schema/predicates/hash_spec.rb +0 -69
  169. data/spec/integration/schema/predicates/included_in/array_spec.rb +0 -459
  170. data/spec/integration/schema/predicates/included_in/range_spec.rb +0 -459
  171. data/spec/integration/schema/predicates/includes_spec.rb +0 -391
  172. data/spec/integration/schema/predicates/key_spec.rb +0 -88
  173. data/spec/integration/schema/predicates/lt_spec.rb +0 -520
  174. data/spec/integration/schema/predicates/lteq_spec.rb +0 -519
  175. data/spec/integration/schema/predicates/max_size_spec.rb +0 -391
  176. data/spec/integration/schema/predicates/min_size_spec.rb +0 -391
  177. data/spec/integration/schema/predicates/none_spec.rb +0 -265
  178. data/spec/integration/schema/predicates/not_eql_spec.rb +0 -391
  179. data/spec/integration/schema/predicates/odd_spec.rb +0 -455
  180. data/spec/integration/schema/predicates/size/fixed_spec.rb +0 -398
  181. data/spec/integration/schema/predicates/size/range_spec.rb +0 -395
  182. data/spec/integration/schema/predicates/type_spec.rb +0 -413
  183. data/spec/integration/schema/reusing_schema_spec.rb +0 -33
  184. data/spec/integration/schema/using_types_spec.rb +0 -135
  185. data/spec/integration/schema/validate_spec.rb +0 -120
  186. data/spec/integration/schema/xor_spec.rb +0 -35
  187. data/spec/integration/schema_builders_spec.rb +0 -17
  188. data/spec/integration/schema_spec.rb +0 -173
  189. data/spec/shared/message_compiler.rb +0 -11
  190. data/spec/shared/predicate_helper.rb +0 -15
  191. data/spec/shared/rule_compiler.rb +0 -8
  192. data/spec/spec_helper.rb +0 -62
  193. data/spec/support/define_struct.rb +0 -25
  194. data/spec/support/matchers.rb +0 -38
  195. data/spec/support/mutant.rb +0 -9
  196. data/spec/support/predicates_integration.rb +0 -7
  197. data/spec/unit/input_processor_compiler/json_spec.rb +0 -283
  198. data/spec/unit/input_processor_compiler/params_spec.rb +0 -328
  199. data/spec/unit/message_compiler/visit_failure_spec.rb +0 -38
  200. data/spec/unit/message_compiler/visit_spec.rb +0 -16
  201. data/spec/unit/message_compiler_spec.rb +0 -7
  202. data/spec/unit/predicate_registry_spec.rb +0 -34
  203. data/spec/unit/schema/key_spec.rb +0 -38
  204. data/spec/unit/schema/rule_spec.rb +0 -42
  205. data/spec/unit/schema/value_spec.rb +0 -131
  206. data/spec/unit/schema_spec.rb +0 -35
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d569600e476b1c0830184bea7e9393f333693e11c1a9d8b074e2b2329deeba7a
4
- data.tar.gz: 4811db9bc4e1cc3f398df8717333683355779116a72314532b10bc2d49a87333
3
+ metadata.gz: ea571eab29d2c8f50457cd8472a8f0d66da98bfda7f7fd1b697776532193b12d
4
+ data.tar.gz: 0e45ff77064b269b25e4c9dbc84219dcc78e07390bb14e75dd2fa0ab24593096
5
5
  SHA512:
6
- metadata.gz: c497db70c2bf78e3355c685176361b06357ee9d9f17a2c867127d4d575865f0e6cb1f5bafae4b595e1db3af8748fc6122e6522177a152e17e8e6119006591b3c
7
- data.tar.gz: 2b93c44b453e47f6a68ec05bedaec9d2f48d001a6dc9d0f62f2f2d7b70de5f8c1a7130bfc33c558fff1129fceb69d37f33f341d38c96549570a684d7279d24b0
6
+ metadata.gz: ddc760c72d530ceada83071591ebb7d214ed1c1fe7ec56486120170cd8b32a50916468dc086018820d3505a1eb14df1cbfe07a80b212da7c5f67c262dc47847b
7
+ data.tar.gz: d06df105ce8e8a9ef8720dd6df9748585c9621a39bca8a73067e337ad153edbdbd052581be687a6df9bc0c62e16b1ad9fb8866014a0d4ba9a2c411c31d892610
@@ -1,62 +1,343 @@
1
- # v0.13.3 2019-05-21
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
- * Fixed regression with caching templates that rely on predicate arguments (solnic)
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
- * [internal] `Messages::Abstract#call` returns a `Template` object now, this was backported from dry-schema (solnic)
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
- [Compare v0.13.2...v0.13.3](https://github.com/dry-rb/dry-validation/compare/v0.13.2...v0.13.3)
113
+ ## 1.1.0 2019-06-14
13
114
 
14
- # v0.13.2 2019-05-12
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
- * Caching message templates uses restricted set of known keys to calculate cache keys (solnic)
124
+ - Passing multiple macro names to `validate` or `each` works correctly (fixed #538 #541) (@jandudulski)
125
+
19
126
 
20
- [Compare v0.13.1...v0.13.2](https://github.com/dry-rb/dry-validation/compare/v0.13.1...v0.13.2)
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
- # v0.13.1 2019-03-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
- - `dry-types` was locked to `~> 0.14.0` (flash-gordon)
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
- [Compare v0.13.0...v0.13.1](https://github.com/dry-rb/dry-validation/compare/v0.13.0...v0.13.1)
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
- # v0.13.0 2019-01-29
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
- - `dry-logic` was bumped to `~> 0.5` (solnic)
35
- - `dry-types` was bumped to `~> 0.14` (solnic)
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
- [Compare v0.12.2...v0.13.0](https://github.com/dry-rb/dry-validation/compare/v0.12.2...v0.13.0)
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
- # v0.12.1 2018-07-06
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
- # v0.12.0 2018-05-31
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
- # v0.11.1 2017-09-15
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
- # v0.11.0 2017-05-30
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
- # v0.10.7 2017-05-15
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
- # v0.10.6 2017-04-26
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
- # v0.10.5 2017-01-12
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
- # v0.10.4 2016-12-03
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
- # v0.10.3 2016-09-27
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
- # v0.10.2 2016-09-23
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
- # v0.10.1 2016-09-22
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
- # v0.10.0 2016-09-21
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
- # v0.9.5 2016-08-16
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
- # v0.9.4 2016-08-11
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
- # v0.9.3 2016-07-22
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
- # v0.9.2 2016-07-13
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
- # v0.9.1 2016-07-11
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
- # v0.9.0 2016-07-08
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
- ### Internal
553
+ ### Changed
259
554
 
260
- - Compiling messages is now ~5% faster (solnic + splattael)
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
- # v0.8.0 2016-07-01
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
- # v0.7.4 2016-04-06
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
- # v0.7.3 2016-03-30
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
- # v0.7.2 2016-03-28
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
- # v0.7.1 2016-03-21
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
- # v0.7.0 2016-03-16
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
- # v0.6.0 2016-01-20
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
- # v0.5.0 2016-01-11
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
- ### Changed
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
- # v0.4.1 2015-12-27
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
- # v0.4.0 2015-12-21
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
- # v0.3.1 2015-12-08
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
- # v0.3.0 2015-12-07
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...HEAD](https://github.com/dry-rb/dry-validation/compare/v0.2.0...HEAD)
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
- # v0.1.0 2015-11-25
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