dry-rb / dry-rb/dry-validation
Add key.success? and key.failure? predicates
Open
feature
help wanted
- Dominant language
- Ruby
- Stars
- 1.4k
- Forks
- 195
- PR merge metrics
- No merged PRs in 30d
Description
In complex rules, it may be useful to know whether the key has any failure message already.
```ruby
rule(:foos).each do
key.success? # => true
key.failure? # => false
key.failure('wrong')
key.success? # => false
key.failure? # => true
end
```
Contributor guide
Research direction
Begin by tracing the key object exposed inside rule(:foos).each and how failure messages are recorded. Completion should cover the example's state transitions: success? is true before a failure, then false, while failure? changes from false to true after key.failure('wrong'). Add focused tests for these transitions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100