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)