v1.0.0.beta1
Pre-release
Pre-release
Added
- New API for setting failures
base.failurefor base errors andkey.failurefor key errors (solnic) - Support for
baseerrors associated with a key even when child keys have errors too (solnic) - Support for
baseerrors not associated with any key (solnic) - Result objects use
ErrorSetobject now for managing messages (solnic) - Nested keys are properly handled when generating messages hash (issue #489) (flash-gordon + solnic)
- Result objects support
localeandfulloptions now (solnic) - Ability to configure
top_namespacefor 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#errorsreturns an instance ofErrorSetnow, it's an enumerable, coerible to a hash (solnic) - [BREAKING]
failurewas removed in favor ofkey.failureorkey(:foo).failure(solnic) - [BREAKING]
Result#to_hashwas removed (flash-gordon)