dry-validation v1.0.0.beta1 Release Notes
Release Date: 2019-03-26 // about 5 years ago-
โ Added
- ๐ New API for setting failures
base.failure
for base errors andkey.failure
for key errors (solnic) - ๐ Support for
base
errors associated with a key even when child keys have errors too (solnic) - ๐ Support for
base
errors not associated with any key (solnic) - Result objects use
ErrorSet
object now for managing messages (solnic) - Nested keys are properly handled when generating messages hash (issue #489) (flash-gordon + solnic)
- ๐ Result objects support
locale
andfull
options now (solnic) - ๐ง Ability to configure
top_namespace
for messages, which will be used for both schema and rule localization (solnic) - Rule blocks receive a context object that you can use to share data between rules (solnic)
๐ Changed
- [BREAKING]
Result#errors
returns an instance ofErrorSet
now, it's an enumerable, coerible to a hash (solnic) - ๐ [BREAKING]
failure
was removed in favor ofkey.failure
orkey(:foo).failure
(solnic) - ๐ [BREAKING]
Result#to_hash
was removed (flash-gordon)
- ๐ New API for setting failures