This release is a complete rewrite on top of dry-schema
that uses contract classes to define schema and validation rules. It's not backward-compatible. This release addressed over 150 known issues, including bugs and missing features.
See the list of all addressed issues as well as issues that were moved to dry-schema and addressed there.
✨ Release highlights ✨
- New
Dry::Validation::Contract
API for defining contract classes with schemas and validation rules - Improved message backends with support for
key
andbase
messages, and arbitrary meta-data (like error codes etc.) - Support for defining rules for array elements ie
rule(:items).each { ... }
- Support for macros that encapsulate common rule logic
- Built-in
:acceptance
macro