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 and key.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 and full 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 of ErrorSet now, it's an enumerable, coerible to a hash (solnic)
    • ๐Ÿšš [BREAKING] failure was removed in favor of key.failure or key(:foo).failure (solnic)
    • ๐Ÿšš [BREAKING] Result#to_hash was removed (flash-gordon)

    Compare v1.0.0.alpha2...v1.0.0.beta1