dry-validation 1.4.1 → 1.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +203 -113
- data/dry-validation.gemspec +41 -0
- data/lib/dry-validation.rb +1 -1
- data/lib/dry/validation.rb +6 -8
- data/lib/dry/validation/config.rb +2 -2
- data/lib/dry/validation/constants.rb +5 -5
- data/lib/dry/validation/contract.rb +13 -13
- data/lib/dry/validation/contract/class_interface.rb +40 -32
- data/lib/dry/validation/evaluator.rb +21 -8
- data/lib/dry/validation/extensions/hints.rb +1 -3
- data/lib/dry/validation/extensions/monads.rb +1 -1
- data/lib/dry/validation/extensions/predicates_as_macros.rb +2 -2
- data/lib/dry/validation/failures.rb +8 -3
- data/lib/dry/validation/function.rb +2 -2
- data/lib/dry/validation/macro.rb +2 -2
- data/lib/dry/validation/macros.rb +3 -3
- data/lib/dry/validation/message.rb +3 -3
- data/lib/dry/validation/message_set.rb +4 -50
- data/lib/dry/validation/messages/resolver.rb +15 -3
- data/lib/dry/validation/result.rb +15 -8
- data/lib/dry/validation/rule.rb +14 -8
- data/lib/dry/validation/schema_ext.rb +1 -28
- data/lib/dry/validation/values.rb +10 -5
- data/lib/dry/validation/version.rb +1 -1
- metadata +28 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 335dfa8db4764cd1c86619371fea202bfeb0c80cf9a84a2069d7fe4c92a1f5af
|
4
|
+
data.tar.gz: 851e5d59e8c4a1c9ce338d5e3fb01b02159da120fb2a775bcec5168ac705c20e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1da1b675edac12c4d7256cb15b770a87387ffc352330434db7a82f177c65ce21dcc8a4803fce2be1d85d29be8df26979fe6e91d43111cebe04c6875500523c29
|
7
|
+
data.tar.gz: 102cf75e197be20843af749584c2a6abd57ce8334d940bff7dd06dc4e37c54fd451bb244dc3365bca913334e3b0c3b3bd391c68b3f9c4e13c4da6efb9c69213f
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,65 @@
|
|
1
|
-
|
1
|
+
## 1.5.3 2020-07-27
|
2
|
+
|
3
|
+
|
4
|
+
### Added
|
5
|
+
|
6
|
+
- You can now access current value's index via `rule(:foo).each do |index:|` (issue #606 done via #657) (@mrbongiolo)
|
7
|
+
|
8
|
+
### Changed
|
9
|
+
|
10
|
+
- `Result#error?` is now a public API and it takes into consideration both schema and rule errors (issue #655 fixed via #656) (@PragTob)
|
11
|
+
|
12
|
+
[Compare v1.5.2...v1.5.3](https://github.com/dry-rb/dry-validation/compare/v1.5.2...v1.5.3)
|
13
|
+
|
14
|
+
## 1.5.2 2020-07-14
|
15
|
+
|
16
|
+
|
17
|
+
### Fixed
|
18
|
+
|
19
|
+
- `key?` predicate in rules no longer crashes when the rule path points to a non-existent array value (issue #653 fixed via #654) (@solnic)
|
20
|
+
|
21
|
+
|
22
|
+
[Compare v1.5.1...v1.5.2](https://github.com/dry-rb/dry-validation/compare/v1.5.1...v1.5.2)
|
23
|
+
|
24
|
+
## 1.5.1 2020-06-18
|
25
|
+
|
26
|
+
|
27
|
+
### Fixed
|
28
|
+
|
29
|
+
- dry-monads no longer required for the `:hints` extension (@schokomarie)
|
30
|
+
- Using `full: true` option works as expected with custom rule messages (issue #618 fixed via #651) (@sirfilip)
|
31
|
+
- Using `locale: ...` option works as expected with hints (issue #589 fixed via 652) (@sirfilip)
|
32
|
+
|
33
|
+
|
34
|
+
[Compare v1.5.0...v1.5.1](https://github.com/dry-rb/dry-validation/compare/v1.5.0...v1.5.1)
|
35
|
+
|
36
|
+
## 1.5.0 2020-03-11
|
37
|
+
|
38
|
+
|
39
|
+
### Added
|
40
|
+
|
41
|
+
- `schema_error?` rule helper (@waiting-for-dev)
|
42
|
+
- `rule_error?` rule helper (@waiting-for-dev)
|
43
|
+
|
44
|
+
### Changed
|
45
|
+
|
46
|
+
- dry-schema dependency was bumped to `~> 1.5` (@solnic)
|
47
|
+
- [internal] `KeyMap` patches have been removed since dry-schema now provides required functionality (@solnic)
|
48
|
+
|
49
|
+
[Compare v1.4.2...v1.5.0](https://github.com/dry-rb/dry-validation/compare/v1.4.2...v1.5.0)
|
50
|
+
|
51
|
+
## 1.4.2 2020-01-18
|
52
|
+
|
53
|
+
|
54
|
+
### Fixed
|
55
|
+
|
56
|
+
- Macros using predicates that accept a range argument work as expected (no need to wrap the argument in an array) (@waiting-for-dev)
|
57
|
+
|
58
|
+
|
59
|
+
[Compare v1.4.1...v1.4.2](https://github.com/dry-rb/dry-validation/compare/v1.4.1...v1.4.2)
|
60
|
+
|
61
|
+
## 1.4.1 2020-01-08
|
62
|
+
|
2
63
|
|
3
64
|
### Added
|
4
65
|
|
@@ -8,11 +69,12 @@
|
|
8
69
|
|
9
70
|
- List tokens are correctly interpolated as a comma separated list in rule messages (see #611) (@waiting-for-dev)
|
10
71
|
- Warnings about delegated keywords (@flash-gordon)
|
11
|
-
|
72
|
+
|
12
73
|
|
13
74
|
[Compare v1.4.0...v1.4.1](https://github.com/dry-rb/dry-validation/compare/v1.4.0...v1.4.1)
|
14
75
|
|
15
|
-
|
76
|
+
## 1.4.0 2019-12-12
|
77
|
+
|
16
78
|
|
17
79
|
### Added
|
18
80
|
|
@@ -32,7 +94,8 @@
|
|
32
94
|
|
33
95
|
[Compare v1.3.1...v1.4.0](https://github.com/dry-rb/dry-validation/compare/v1.3.1...v1.4.0)
|
34
96
|
|
35
|
-
|
97
|
+
## 1.3.1 2019-08-16
|
98
|
+
|
36
99
|
|
37
100
|
### Changed
|
38
101
|
|
@@ -40,7 +103,8 @@
|
|
40
103
|
|
41
104
|
[Compare v1.3.0...v1.3.1](https://github.com/dry-rb/dry-validation/compare/v1.3.0...v1.3.1)
|
42
105
|
|
43
|
-
|
106
|
+
## 1.3.0 2019-08-14
|
107
|
+
|
44
108
|
|
45
109
|
### Added
|
46
110
|
|
@@ -56,7 +120,8 @@
|
|
56
120
|
|
57
121
|
[Compare v1.2.1...v1.3.0](https://github.com/dry-rb/dry-validation/compare/v1.2.1...v1.3.0)
|
58
122
|
|
59
|
-
|
123
|
+
## 1.2.1 2019-07-16
|
124
|
+
|
60
125
|
|
61
126
|
### Fixed
|
62
127
|
|
@@ -65,9 +130,11 @@
|
|
65
130
|
- Fixed an issue where guarding a rule would crash when keys are missing in the input (issue #569) (@solnic)
|
66
131
|
- Added missing "pathname" require (issue #570) (@solnic)
|
67
132
|
|
133
|
+
|
68
134
|
[Compare v1.2.0...v1.2.1](https://github.com/dry-rb/dry-validation/compare/v1.2.0...v1.2.1)
|
69
135
|
|
70
|
-
|
136
|
+
## 1.2.0 2019-07-08
|
137
|
+
|
71
138
|
|
72
139
|
### Added
|
73
140
|
|
@@ -83,15 +150,18 @@
|
|
83
150
|
|
84
151
|
[Compare v1.1.1...v1.2.0](https://github.com/dry-rb/dry-validation/compare/v1.1.1...v1.2.0)
|
85
152
|
|
86
|
-
|
153
|
+
## 1.1.1 2019-06-24
|
154
|
+
|
87
155
|
|
88
156
|
### Fixed
|
89
157
|
|
90
158
|
- `Rule#each` works with array values from nested hashes (@mustardnoise)
|
91
159
|
|
160
|
+
|
92
161
|
[Compare v1.1.0...v1.1.1](https://github.com/dry-rb/dry-validation/compare/v1.1.0...v1.1.1)
|
93
162
|
|
94
|
-
|
163
|
+
## 1.1.0 2019-06-14
|
164
|
+
|
95
165
|
|
96
166
|
### Added
|
97
167
|
|
@@ -103,25 +173,18 @@
|
|
103
173
|
|
104
174
|
- Passing multiple macro names to `validate` or `each` works correctly (fixed #538 #541) (@jandudulski)
|
105
175
|
|
106
|
-
[Compare v1.0.0...v1.1.0](https://github.com/dry-rb/dry-validation/compare/v1.0.0...v1.1.0)
|
107
176
|
|
108
|
-
|
177
|
+
[Compare v1.0.0...v1.1.0](https://github.com/dry-rb/dry-validation/compare/v1.0.0...v1.1.0)
|
109
178
|
|
110
|
-
|
179
|
+
## 1.0.0 2019-06-10
|
111
180
|
|
112
181
|
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).
|
113
182
|
|
114
|
-
### :sparkles: Release highlights :sparkles:
|
115
183
|
|
116
|
-
-
|
117
|
-
- Improved message backends with support for `key` and `base` messages, and arbitrary meta-data (like error codes etc.)
|
118
|
-
- Support for defining rules for array elements ie `rule(:items).each { ... }`
|
119
|
-
- Support for macros that encapsulate common rule logic
|
120
|
-
- Built-in `:acceptance` macro
|
184
|
+
[Compare v1.0.0...v1.0.0](https://github.com/dry-rb/dry-validation/compare/v1.0.0...v1.0.0)
|
121
185
|
|
122
|
-
|
186
|
+
## 1.0.0 2019-06-10
|
123
187
|
|
124
|
-
# v1.0.0 2019-06-10 (compared to 1.0.0.rc3)
|
125
188
|
|
126
189
|
### Added
|
127
190
|
|
@@ -144,7 +207,8 @@ See [the list of all addressed issues](https://github.com/dry-rb/dry-validation/
|
|
144
207
|
|
145
208
|
[Compare v1.0.0.rc3...v1.0.0](https://github.com/dry-rb/dry-validation/compare/v1.0.0.rc3...v1.0.0)
|
146
209
|
|
147
|
-
|
210
|
+
## 1.0.0.rc3 2019-05-06
|
211
|
+
|
148
212
|
|
149
213
|
### Added
|
150
214
|
|
@@ -157,9 +221,10 @@ See [the list of all addressed issues](https://github.com/dry-rb/dry-validation/
|
|
157
221
|
|
158
222
|
- `config/errors.yml` are now bundled with the gem, **`rc2` was broken because of this** (solnic)
|
159
223
|
|
224
|
+
|
160
225
|
[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)
|
161
226
|
|
162
|
-
|
227
|
+
## 1.0.0.rc2 2019-05-04
|
163
228
|
|
164
229
|
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`.
|
165
230
|
|
@@ -179,7 +244,8 @@ This was **yanked** on rubygems.org because the bundled gem was missing `config`
|
|
179
244
|
|
180
245
|
[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)
|
181
246
|
|
182
|
-
|
247
|
+
## 1.0.0.rc1 2019-04-26
|
248
|
+
|
183
249
|
|
184
250
|
### Added
|
185
251
|
|
@@ -198,7 +264,8 @@ This was **yanked** on rubygems.org because the bundled gem was missing `config`
|
|
198
264
|
|
199
265
|
[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)
|
200
266
|
|
201
|
-
|
267
|
+
## 1.0.0.beta2 2019-04-04
|
268
|
+
|
202
269
|
|
203
270
|
### Added
|
204
271
|
|
@@ -226,7 +293,8 @@ This was **yanked** on rubygems.org because the bundled gem was missing `config`
|
|
226
293
|
|
227
294
|
[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)
|
228
295
|
|
229
|
-
|
296
|
+
## 1.0.0.beta1 2019-03-26
|
297
|
+
|
230
298
|
|
231
299
|
### Added
|
232
300
|
|
@@ -247,7 +315,7 @@ This was **yanked** on rubygems.org because the bundled gem was missing `config`
|
|
247
315
|
|
248
316
|
[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)
|
249
317
|
|
250
|
-
|
318
|
+
## 1.0.0.alpha2 2019-03-05
|
251
319
|
|
252
320
|
First round of bug fixes. Thanks for testing <3!
|
253
321
|
|
@@ -263,7 +331,7 @@ First round of bug fixes. Thanks for testing <3!
|
|
263
331
|
|
264
332
|
[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)
|
265
333
|
|
266
|
-
|
334
|
+
## 1.0.0.alpha1 2019-03-04
|
267
335
|
|
268
336
|
Complete rewrite on top of `dry-schema`.
|
269
337
|
|
@@ -272,22 +340,25 @@ Complete rewrite on top of `dry-schema`.
|
|
272
340
|
- [BREAKING] `Dry::Validation::Contract` as a replacement for validation schemas (solnic)
|
273
341
|
- [BREAKING] New `rule` DSL with an improved API for setting error messages (solnic)
|
274
342
|
|
275
|
-
[Compare v0.13.0...v1.0.0.alpha1](https://github.com/dry-rb/dry-validation/compare/v0.13.0...v1.0.0.alpha1)
|
276
343
|
|
277
|
-
|
344
|
+
[Compare v0.13.0...v1.0.0.alpha1](https://github.com/dry-rb/dry-validation/compare/v0.13.0...v1.0.0.alpha1)
|
278
345
|
|
279
|
-
|
346
|
+
## 0.13.0 2019-01-29
|
280
347
|
|
281
|
-
- `dry-logic` was bumped to `~> 0.5` (solnic)
|
282
|
-
- `dry-types` was bumped to `~> 0.14` (solnic)
|
283
348
|
|
284
349
|
### Fixed
|
285
350
|
|
286
351
|
- Warning about method redefined (amatsuda)
|
287
352
|
|
353
|
+
### Changed
|
354
|
+
|
355
|
+
- `dry-logic` was bumped to `~> 0.5` (solnic)
|
356
|
+
- `dry-types` was bumped to `~> 0.14` (solnic)
|
357
|
+
|
288
358
|
[Compare v0.12.3...v0.13.0](https://github.com/dry-rb/dry-validation/compare/v0.12.3...v0.13.0)
|
289
359
|
|
290
|
-
|
360
|
+
## 0.12.3 2019-01-29
|
361
|
+
|
291
362
|
|
292
363
|
### Changed
|
293
364
|
|
@@ -295,23 +366,28 @@ Complete rewrite on top of `dry-schema`.
|
|
295
366
|
|
296
367
|
[Compare v0.12.2...v0.12.3](https://github.com/dry-rb/dry-validation/compare/v0.12.2...v0.12.3)
|
297
368
|
|
298
|
-
|
369
|
+
## 0.12.2 2018-08-29
|
370
|
+
|
299
371
|
|
300
372
|
### Fixed
|
301
373
|
|
302
374
|
- Use correct key names for rule messages when using i18n (jozzi05)
|
303
375
|
|
376
|
+
|
304
377
|
[Compare v0.12.1...v0.12.2](https://github.com/dry-rb/dry-validation/compare/v0.12.1...v0.12.2)
|
305
378
|
|
306
|
-
|
379
|
+
## 0.12.1 2018-07-06
|
380
|
+
|
307
381
|
|
308
382
|
### Fixed
|
309
383
|
|
310
384
|
- [internal] fixed deprecation warnings (flash-gordon)
|
311
385
|
|
386
|
+
|
312
387
|
[Compare v0.12.0...v0.12.1](https://github.com/dry-rb/dry-validation/compare/v0.12.0...v0.12.1)
|
313
388
|
|
314
|
-
|
389
|
+
## 0.12.0 2018-05-31
|
390
|
+
|
315
391
|
|
316
392
|
### Changed
|
317
393
|
|
@@ -320,7 +396,8 @@ Complete rewrite on top of `dry-schema`.
|
|
320
396
|
|
321
397
|
[Compare v0.11.1...v0.12.0](https://github.com/dry-rb/dry-validation/compare/v0.11.1...v0.12.0)
|
322
398
|
|
323
|
-
|
399
|
+
## 0.11.1 2017-09-15
|
400
|
+
|
324
401
|
|
325
402
|
### Changed
|
326
403
|
|
@@ -329,7 +406,8 @@ Complete rewrite on top of `dry-schema`.
|
|
329
406
|
|
330
407
|
[Compare v0.11.0...v0.11.1](https://github.com/dry-rb/dry-validation/compare/v0.11.0...v0.11.1)
|
331
408
|
|
332
|
-
|
409
|
+
## 0.11.0 2017-05-30
|
410
|
+
|
333
411
|
|
334
412
|
### Changed
|
335
413
|
|
@@ -337,32 +415,39 @@ Complete rewrite on top of `dry-schema`.
|
|
337
415
|
|
338
416
|
[Compare v0.10.7...v0.11.0](https://github.com/dry-rb/dry-validation/compare/v0.10.7...v0.11.0)
|
339
417
|
|
340
|
-
|
418
|
+
## 0.10.7 2017-05-15
|
419
|
+
|
341
420
|
|
342
421
|
### Fixed
|
343
422
|
|
344
423
|
- `validate` can now be defined multiple times for the same key (kimquy)
|
345
424
|
- Re-using rules between schemas no longer mutates original rule set (pabloh)
|
346
425
|
|
426
|
+
|
347
427
|
[Compare v0.10.6...v0.10.7](https://github.com/dry-rb/dry-validation/compare/v0.10.6...v0.10.7)
|
348
428
|
|
349
|
-
|
429
|
+
## 0.10.6 2017-04-26
|
430
|
+
|
350
431
|
|
351
432
|
### Fixed
|
352
433
|
|
353
434
|
- Fixes issue with wrong localized error messages when namespaced messages are used (kbredemeier)
|
354
435
|
|
436
|
+
|
355
437
|
[Compare v0.10.5...v0.10.6](https://github.com/dry-rb/dry-validation/compare/v0.10.5...v0.10.6)
|
356
438
|
|
357
|
-
|
439
|
+
## 0.10.5 2017-01-12
|
440
|
+
|
358
441
|
|
359
442
|
### Fixed
|
360
443
|
|
361
444
|
- Warnings under MRI 2.4.0 are gone (koic)
|
362
445
|
|
446
|
+
|
363
447
|
[Compare v0.10.4...v0.10.5](https://github.com/dry-rb/dry-validation/compare/v0.10.4...v0.10.5)
|
364
448
|
|
365
|
-
|
449
|
+
## 0.10.4 2016-12-03
|
450
|
+
|
366
451
|
|
367
452
|
### Fixed
|
368
453
|
|
@@ -375,31 +460,38 @@ Complete rewrite on top of `dry-schema`.
|
|
375
460
|
|
376
461
|
[Compare v0.10.3...v0.10.4](https://github.com/dry-rb/dry-validation/compare/v0.10.3...v0.10.4)
|
377
462
|
|
378
|
-
|
463
|
+
## 0.10.3 2016-09-27
|
464
|
+
|
379
465
|
|
380
466
|
### Fixed
|
381
467
|
|
382
468
|
- Custom predicates work correctly with `each` macro (solnic)
|
383
469
|
|
470
|
+
|
384
471
|
[Compare v0.10.2...v0.10.3](https://github.com/dry-rb/dry-validation/compare/v0.10.2...v0.10.3)
|
385
472
|
|
386
|
-
|
473
|
+
## 0.10.2 2016-09-23
|
474
|
+
|
387
475
|
|
388
476
|
### Fixed
|
389
477
|
|
390
478
|
- Constrained types + hints work again (solnic)
|
391
479
|
|
480
|
+
|
392
481
|
[Compare v0.10.1...v0.10.2](https://github.com/dry-rb/dry-validation/compare/v0.10.1...v0.10.2)
|
393
482
|
|
394
|
-
|
483
|
+
## 0.10.1 2016-09-22
|
484
|
+
|
395
485
|
|
396
486
|
### Fixed
|
397
487
|
|
398
488
|
- Remove obsolete require of `dry/struct` which is now an optional extension (flash-gordon)
|
399
489
|
|
490
|
+
|
400
491
|
[Compare v0.10.0...v0.10.1](https://github.com/dry-rb/dry-validation/compare/v0.10.0...v0.10.1)
|
401
492
|
|
402
|
-
|
493
|
+
## 0.10.0 2016-09-21
|
494
|
+
|
403
495
|
|
404
496
|
### Added
|
405
497
|
|
@@ -422,34 +514,31 @@ Complete rewrite on top of `dry-schema`.
|
|
422
514
|
- [BREAKING] `when` macro no longer supports multiple disconnected rules in its block, whatever the block returns will be used for the implication (solnic)
|
423
515
|
- [BREAKING] `rule(some_name: %i(some keys))` will _always_ use `:some_name` as the key for failure messages (solnic)
|
424
516
|
|
425
|
-
### Internal
|
426
|
-
|
427
|
-
- ~2 x performance boost (solnic)
|
428
|
-
- Rule AST was updated to latest dry-logic (solnic)
|
429
|
-
- `MessageCompiler` was drastically simplified based on the new result AST from dry-logic (solnic)
|
430
|
-
- `HintCompiler` is gone as hints are now part of the result AST (solnic)
|
431
|
-
- `maybe` macro creates an implication instead of a disjunction (`not(none?).then(*your-predicates)`) (solnic)
|
432
|
-
|
433
517
|
[Compare v0.9.5...v0.10.0](https://github.com/dry-rb/dry-validation/compare/v0.9.5...v0.10.0)
|
434
518
|
|
435
|
-
|
519
|
+
## 0.9.5 2016-08-16
|
520
|
+
|
436
521
|
|
437
522
|
### Fixed
|
438
523
|
|
439
524
|
- Infering multiple predicates with options works as expected ie `value(:str?, min_size?: 3, max_size?: 6)` (solnic)
|
440
525
|
- Default `locale` configured in `I18n` is now respected by the messages compiler (agustin + cavi21)
|
441
526
|
|
527
|
+
|
442
528
|
[Compare v0.9.4...v0.9.5](https://github.com/dry-rb/dry-validation/compare/v0.9.4...v0.9.5)
|
443
529
|
|
444
|
-
|
530
|
+
## 0.9.4 2016-08-11
|
531
|
+
|
445
532
|
|
446
533
|
### Fixed
|
447
534
|
|
448
535
|
- Error messages for sibling deeply nested schemas are nested correctly (timriley)
|
449
536
|
|
537
|
+
|
450
538
|
[Compare v0.9.3...v0.9.4](https://github.com/dry-rb/dry-validation/compare/v0.9.3...v0.9.4)
|
451
539
|
|
452
|
-
|
540
|
+
## 0.9.3 2016-07-22
|
541
|
+
|
453
542
|
|
454
543
|
### Added
|
455
544
|
|
@@ -467,24 +556,29 @@ Complete rewrite on top of `dry-schema`.
|
|
467
556
|
|
468
557
|
[Compare v0.9.2...v0.9.3](https://github.com/dry-rb/dry-validation/compare/v0.9.2...v0.9.3)
|
469
558
|
|
470
|
-
|
559
|
+
## 0.9.2 2016-07-13
|
560
|
+
|
471
561
|
|
472
562
|
### Fixed
|
473
563
|
|
474
564
|
- Constrained types now work with `each` macro (solnic)
|
475
565
|
- Array coercion without member type works now ie `required(:arr).maybe(:array?)` (solnic)
|
476
566
|
|
567
|
+
|
477
568
|
[Compare v0.9.1...v0.9.2](https://github.com/dry-rb/dry-validation/compare/v0.9.1...v0.9.2)
|
478
569
|
|
479
|
-
|
570
|
+
## 0.9.1 2016-07-11
|
571
|
+
|
480
572
|
|
481
573
|
### Fixed
|
482
574
|
|
483
575
|
- `I18n` backend is no longer required and set by default (solnic)
|
484
576
|
|
577
|
+
|
485
578
|
[Compare v0.9.0...v0.9.1](https://github.com/dry-rb/dry-validation/compare/v0.9.0...v0.9.1)
|
486
579
|
|
487
|
-
|
580
|
+
## 0.9.0 2016-07-08
|
581
|
+
|
488
582
|
|
489
583
|
### Added
|
490
584
|
|
@@ -497,10 +591,6 @@ Complete rewrite on top of `dry-schema`.
|
|
497
591
|
- Support for message token transformations in custom predicates (fran-worley)
|
498
592
|
- [EXPERIMENTAL] Ability to compose predicates that accept dynamic args provided by the schema (solnic)
|
499
593
|
|
500
|
-
### Changed
|
501
|
-
|
502
|
-
- Tokens for `size?` were renamed `left` => `size_left` and `right` => `size_right` (fran-worley)
|
503
|
-
|
504
594
|
### Fixed
|
505
595
|
|
506
596
|
- Duped key names in nested schemas no longer result in invalid error messages structure (solnic)
|
@@ -510,18 +600,14 @@ Complete rewrite on top of `dry-schema`.
|
|
510
600
|
- Hints for elements are no longer provided for an array when the value is not an array (solnic)
|
511
601
|
- `input` macro no longer messes up error messages for nested structures (solnic)
|
512
602
|
|
513
|
-
###
|
603
|
+
### Changed
|
514
604
|
|
515
|
-
-
|
516
|
-
- Refactored Error and Hint compilers (solnic)
|
517
|
-
- Refactored Schema to use an internal executor objects with steps (solnic)
|
518
|
-
- Extracted root-rule into a separate validation step (solnic)
|
519
|
-
- Added `MessageSet` that result objects now use (in 1.0.0 it'll be exposed via public API) (solnic)
|
520
|
-
- We can now distinguish error messages from validation hints via `Message` and `Hint` objects (solnic)
|
605
|
+
- Tokens for `size?` were renamed `left` => `size_left` and `right` => `size_right` (fran-worley)
|
521
606
|
|
522
607
|
[Compare v0.8.0...v0.9.0](https://github.com/dry-rb/dry-validation/compare/v0.8.0...v0.9.0)
|
523
608
|
|
524
|
-
|
609
|
+
## 0.8.0 2016-07-01
|
610
|
+
|
525
611
|
|
526
612
|
### Added
|
527
613
|
|
@@ -567,19 +653,10 @@ Complete rewrite on top of `dry-schema`.
|
|
567
653
|
- Deprecate key in favor of required (coop)
|
568
654
|
- Remove nested key syntax (solnic)
|
569
655
|
|
570
|
-
### Internal
|
571
|
-
|
572
|
-
- ~15% performance boost via various optimizations (solnic)
|
573
|
-
- When using explicit type specs building a schema is ~80-85x faster (solnic)
|
574
|
-
- No longer uses `Dry::Types::Predicates` as `:type?` predicate was moved to dry-logic (solnic)
|
575
|
-
- Integration specs covering predicates with Form and Schema (jodosha)
|
576
|
-
- Use latest ruby versions on travis (flash-gordon)
|
577
|
-
- Make pry console optional with IRB as a default (flash-gordon)
|
578
|
-
- Remove wrapping rules in :set nodes (solnic)
|
579
|
-
|
580
656
|
[Compare v0.7.4...v0.8.0](https://github.com/dry-rb/dry-validation/compare/v0.7.4...v0.8.0)
|
581
657
|
|
582
|
-
|
658
|
+
## 0.7.4 2016-04-06
|
659
|
+
|
583
660
|
|
584
661
|
### Added
|
585
662
|
|
@@ -590,9 +667,11 @@ Complete rewrite on top of `dry-schema`.
|
|
590
667
|
|
591
668
|
- Depending on deeply nested values in high-level rules works now (solnic)
|
592
669
|
|
670
|
+
|
593
671
|
[Compare v0.7.3...v0.7.4](https://github.com/dry-rb/dry-validation/compare/v0.7.3...v0.7.4)
|
594
672
|
|
595
|
-
|
673
|
+
## 0.7.3 2016-03-30
|
674
|
+
|
596
675
|
|
597
676
|
### Added
|
598
677
|
|
@@ -605,22 +684,22 @@ Complete rewrite on top of `dry-schema`.
|
|
605
684
|
- Creating a nested schema properly sets full path to nested data structure (solnic)
|
606
685
|
- Error message for `empty?` predicate is now correct (jodosha)
|
607
686
|
|
608
|
-
### Internal
|
609
|
-
|
610
|
-
- Switch from `thread_safe` to `concurrent` (joevandyk)
|
611
687
|
|
612
688
|
[Compare v0.7.2...v0.7.3](https://github.com/dry-rb/dry-validation/compare/v0.7.2...v0.7.3)
|
613
689
|
|
614
|
-
|
690
|
+
## 0.7.2 2016-03-28
|
691
|
+
|
615
692
|
|
616
693
|
### Added
|
617
694
|
|
618
695
|
- Support for nested schemas inside high-level rules (solnic)
|
619
696
|
- `Schema#to_proc` so that you can do `data.each(&schema)` (solnic)
|
620
697
|
|
698
|
+
|
621
699
|
[Compare v0.7.1...v0.7.2](https://github.com/dry-rb/dry-validation/compare/v0.7.1...v0.7.2)
|
622
700
|
|
623
|
-
|
701
|
+
## 0.7.1 2016-03-21
|
702
|
+
|
624
703
|
|
625
704
|
### Added
|
626
705
|
|
@@ -638,7 +717,8 @@ Complete rewrite on top of `dry-schema`.
|
|
638
717
|
|
639
718
|
[Compare v0.7.0...v0.7.1](https://github.com/dry-rb/dry-validation/compare/v0.7.0...v0.7.1)
|
640
719
|
|
641
|
-
|
720
|
+
## 0.7.0 2016-03-16
|
721
|
+
|
642
722
|
|
643
723
|
### Added
|
644
724
|
|
@@ -662,6 +742,12 @@ Complete rewrite on top of `dry-schema`.
|
|
662
742
|
- `Validation::Result` responds to `#[]` and `#each` (delegating to its output)
|
663
743
|
and it's an enumerable (solnic)
|
664
744
|
|
745
|
+
### Fixed
|
746
|
+
|
747
|
+
- Qualified rule names properly use last node by default for error messages (solnic)
|
748
|
+
- Validation hints only include relevant messages (solnic)
|
749
|
+
- `:yaml` messages respect `:locale` option in `Result#messages` (solnic)
|
750
|
+
|
665
751
|
### Changed
|
666
752
|
|
667
753
|
- `schema` was **removed** from the DSL, just use `key(:name).schema` instead (solnic)
|
@@ -672,15 +758,10 @@ Complete rewrite on top of `dry-schema`.
|
|
672
758
|
- `Schema::Result` is now `Validation::Result` and it no longer has success and
|
673
759
|
failure results, only error results are provided (solnic)
|
674
760
|
|
675
|
-
### Fixed
|
676
|
-
|
677
|
-
- Qualified rule names properly use last node by default for error messages (solnic)
|
678
|
-
- Validation hints only include relevant messages (solnic)
|
679
|
-
- `:yaml` messages respect `:locale` option in `Result#messages` (solnic)
|
680
|
-
|
681
761
|
[Compare v0.6.0...v0.7.0](https://github.com/dry-rb/dry-validation/compare/v0.6.0...v0.7.0)
|
682
762
|
|
683
|
-
|
763
|
+
## 0.6.0 2016-01-20
|
764
|
+
|
684
765
|
|
685
766
|
### Added
|
686
767
|
|
@@ -691,38 +772,41 @@ Complete rewrite on top of `dry-schema`.
|
|
691
772
|
- Support for `confirmation(:foo, some_predicate: some_argument)` shortcut syntax (solnic)
|
692
773
|
- Support for error messages for grouped rules (like `confirmation`) (solnic)
|
693
774
|
- Schemas support injecting rules from the outside (solnic)
|
694
|
-
|
695
|
-
## Changed
|
696
|
-
|
775
|
+
- ## Changed
|
697
776
|
- `rule` uses objects that inherit from `BasicObject` to avoid conflicts with
|
698
777
|
predicate names and built-in `Object` methods (solnic)
|
699
778
|
- In `Schema::Form` both `key` and `optional` will apply `filled?` predicate by
|
700
779
|
default when no block is passed (solnic)
|
701
780
|
|
702
|
-
[Compare v0.5.0...v0.6.0](https://github.com/dry-rb/dry-validation/compare/v0.5.0...v0.6.0)
|
703
781
|
|
704
|
-
|
782
|
+
[Compare v0.5.0...v0.6.0](https://github.com/dry-rb/dry-validation/compare/v0.5.0...v0.6.0)
|
705
783
|
|
706
|
-
|
784
|
+
## 0.5.0 2016-01-11
|
707
785
|
|
708
|
-
- Now depends on [dry-logic](https://github.com/dry-rb/dry-logic) for predicates and rules (solnic)
|
709
|
-
- `dry/validation/schema/form` is now required by default (solnic)
|
710
786
|
|
711
787
|
### Fixed
|
712
788
|
|
713
789
|
- `Schema::Form` uses safe `form.array` and `form.hash` types which fixes #42 (solnic)
|
714
790
|
|
791
|
+
### Changed
|
792
|
+
|
793
|
+
- Now depends on [dry-logic](https://github.com/dry-rb/dry-logic) for predicates and rules (solnic)
|
794
|
+
- `dry/validation/schema/form` is now required by default (solnic)
|
795
|
+
|
715
796
|
[Compare v0.4.1...v0.5.0](https://github.com/dry-rb/dry-validation/compare/v0.4.1...v0.5.0)
|
716
797
|
|
717
|
-
|
798
|
+
## 0.4.1 2015-12-27
|
799
|
+
|
718
800
|
|
719
801
|
### Added
|
720
802
|
|
721
803
|
- Support for `each` and type coercion inference in `Schema::Form` (solnic)
|
722
804
|
|
805
|
+
|
723
806
|
[Compare v0.4.0...v0.4.1](https://github.com/dry-rb/dry-validation/compare/v0.4.0...v0.4.1)
|
724
807
|
|
725
|
-
|
808
|
+
## 0.4.0 2015-12-21
|
809
|
+
|
726
810
|
|
727
811
|
### Added
|
728
812
|
|
@@ -736,9 +820,11 @@ Complete rewrite on top of `dry-schema`.
|
|
736
820
|
|
737
821
|
- Error messages hash has now consistent structure `rule_name => [msgs_array, input_value]` (solnic)
|
738
822
|
|
823
|
+
|
739
824
|
[Compare v0.3.1...v0.4.0](https://github.com/dry-rb/dry-validation/compare/v0.3.1...v0.4.0)
|
740
825
|
|
741
|
-
|
826
|
+
## 0.3.1 2015-12-08
|
827
|
+
|
742
828
|
|
743
829
|
### Added
|
744
830
|
|
@@ -748,9 +834,11 @@ Complete rewrite on top of `dry-schema`.
|
|
748
834
|
|
749
835
|
- Error compiler returns an empty hash rather than a nil when there are no errors (solnic)
|
750
836
|
|
837
|
+
|
751
838
|
[Compare v0.3.0...v0.3.1](https://github.com/dry-rb/dry-validation/compare/v0.3.0...v0.3.1)
|
752
839
|
|
753
|
-
|
840
|
+
## 0.3.0 2015-12-07
|
841
|
+
|
754
842
|
|
755
843
|
### Added
|
756
844
|
|
@@ -772,9 +860,10 @@ Complete rewrite on top of `dry-schema`.
|
|
772
860
|
errors and messages
|
773
861
|
- `Schema::Result#messages` returns a hash with rule names, messages and input values (solnic)
|
774
862
|
|
775
|
-
[Compare v0.2.0...
|
863
|
+
[Compare v0.2.0...v0.3.0](https://github.com/dry-rb/dry-validation/compare/v0.2.0...v0.3.0)
|
864
|
+
|
865
|
+
## 0.2.0 2015-11-30
|
776
866
|
|
777
|
-
# v0.2.0 2015-11-30
|
778
867
|
|
779
868
|
### Added
|
780
869
|
|
@@ -795,8 +884,9 @@ Complete rewrite on top of `dry-schema`.
|
|
795
884
|
|
796
885
|
- Added missing `and` / `or` interfaces to composite rules (solnic)
|
797
886
|
|
798
|
-
[Compare v0.1.0...HEAD](https://github.com/dry-rb/dry-validation/compare/v0.1.0...HEAD)
|
799
887
|
|
800
|
-
|
888
|
+
[Compare v0.1.0...v0.2.0](https://github.com/dry-rb/dry-validation/compare/v0.1.0...v0.2.0)
|
889
|
+
|
890
|
+
## 0.1.0 2015-11-25
|
801
891
|
|
802
892
|
First public release
|