interactor-validation 0.3.2 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +31 -0
- data/README.md +1179 -44
- data/lib/interactor/validation/configuration.rb +6 -2
- data/lib/interactor/validation/validates.rb +91 -34
- data/lib/interactor/validation/version.rb +1 -1
- metadata +5 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c04988b5dd697205afaeb05c9ab9e62f29151b45cd49b899e69e6c58a99ad5dc
|
|
4
|
+
data.tar.gz: 3e74aad1b6f1186339654d581e1e65cbb3ea682b35d47755540857344f807b73
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 93a238c069715b99b71fe963e6bd36b6daf44247e9d2fc13b2fe187cfec33bd523b3ce6f1055db37a1afe4cb1ac677b633a15e542c7ae3b0c60f722539a0e258
|
|
7
|
+
data.tar.gz: 6cdc93de76e4f7e0d15a2a71f28e9c0b31992eeb7da3934da6be05a01e28274988524d466953a59daf435d291bc2e91aba067392b8559de199ee40d0da06d5d5
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.4.0] - 2025-11-17
|
|
4
|
+
|
|
5
|
+
### New Features
|
|
6
|
+
|
|
7
|
+
- **Added per-error halt support** - Use `errors.add(:field, "message", halt: true)` for fine-grained control over validation flow
|
|
8
|
+
- **Renamed `halt_on_first_error` to `halt`** - Simpler, more concise configuration option
|
|
9
|
+
- **Enhanced halt behavior** - Now supports both within-parameter and across-parameter early returns
|
|
10
|
+
|
|
11
|
+
### Improvements
|
|
12
|
+
|
|
13
|
+
- Validation halts immediately when `halt: true` is used in custom validations
|
|
14
|
+
- Global `halt` configuration stops validation after first error across all parameters
|
|
15
|
+
- Within-parameter halt skips remaining validation rules for that specific parameter
|
|
16
|
+
- Added `ErrorsWrapper` class to intercept `errors.add` calls and extract `halt:` option
|
|
17
|
+
|
|
18
|
+
### Deprecations
|
|
19
|
+
|
|
20
|
+
- `config.halt_on_first_error` is deprecated in favor of `config.halt` (backward compatible with alias)
|
|
21
|
+
|
|
22
|
+
### Documentation
|
|
23
|
+
|
|
24
|
+
- Updated README with comprehensive halt feature documentation and examples
|
|
25
|
+
- Added usage examples for both global and per-error halt configurations
|
|
26
|
+
- Documented halt behavior and use cases
|
|
27
|
+
|
|
28
|
+
### Testing
|
|
29
|
+
|
|
30
|
+
- Added 16 new tests specifically for halt functionality
|
|
31
|
+
- All 322 tests passing with no regressions
|
|
32
|
+
- Line coverage: 95.37% | Branch coverage: 85.09%
|
|
33
|
+
|
|
3
34
|
## [0.2.0] - 2024-11-16
|
|
4
35
|
|
|
5
36
|
### Security
|