Dry Validation
Validate incoming records using typed Ruby contracts and rules.
dry-rb · Code and testing
GitHub projectOpen source Open on GitHubHow to try it
With Ruby 3.2 available, install dry-validation at version 1.10.0. Validate one fruit count inside a contract and reject a negative count.
What we tested
1.10.0. Validate one fruit count inside a contract and reject a negative count. The contract accepted 5 and returned validation errors for -1.