dry-validation v0.8.0 Release Notes

Release Date: 2016-07-01 // almost 8 years ago
  • โž• Added

    • Explicit interface for type specs used to set up coercions, ie required(:age, :int) (solnic)
    • Support new dry-logic predicates: :excluded_from?, :excludes?, :included_in?, :includes?, :not_eql?, :odd?, :even? (jodosha, fran-worley)
    • ๐Ÿ‘Œ Support for blocks in value, filled and maybe macros (solnic)
    • ๐Ÿ‘Œ Support for passing a schema to value|filled|maybe macros ie maybe(SomeSchema) (solnic)
    • ๐Ÿ‘Œ Support for each(SomeSchema) (solnic)
    • ๐Ÿ‘Œ Support for value|filled|maybe macros + each inside a block ie: maybe(:filled?) { each(:int?) } (solnic)
    • ๐Ÿ‘Œ Support for dedicated hint messages via en.errors.#{predicate}.(hint|failure) look-up paths (solnic)
    • ๐Ÿ‘Œ Support for configuring custom DSL extensions via dsl_extensions setting on Schema class (solnic)
    • ๐Ÿ‘Œ Support for preconfiguring a predicate for the input value ie value :hash? used for prerequisite-checks (solnic)
    • Infer coercion from constrained types (solnic)
    • โž• Add value macro (coop)
    • Enable .schema to accept objects that respond to #schema (ttdonovan)
    • ๐Ÿ‘Œ Support for schema predicates which don't need any arguments (fran-worley)
    • 0๏ธโƒฃ Error and hint messages have access to all predicate arguments by default (fran-worley+solnic)
    • Invalid predicate name in DSL will raise an error (solnic)
    • Predicate with invalid arity in DSL will raise an error (solnic)

    ๐Ÿ›  Fixed

    • ๐Ÿ‘Œ Support for jRuby 9.1.1.0 (flash-gordon)
    • ๐Ÿ›  Fix bug when using predicates with options in each and when (fran-worley)
    • ๐Ÿ›  Fix bug when validating custom types (coop)
    • ๐Ÿ›  Fix depending on deeply nested values in high-lvl rules (solnic)
    • ๐Ÿ›  Fix duplicated error message for lt? when hint was used (solnic)
    • ๐Ÿ›  Fix hints for nested schemas (solnic)
    • ๐Ÿ›  Fix an issue where rules with same names inside nested schemas have incorrect hints (solnic)
    • ๐Ÿ›  Fix a bug where hints were being generated 4 times (solnic)
    • ๐Ÿ›  Fix duplicated error messages when message is different than a hint (solnic)

    ๐Ÿ”„ Changed

    • ๐Ÿ‘‰ Uses new :weak hash constructor from dry-types 0.8.0 which can partially coerce invalid hash (solnic)
    • ๐Ÿ—„ key has been deprecated in favor of required (coop)
    • ๐Ÿ—„ required has been deprecated in favor of filled (coop)
    • Now relies on dry-logic v0.3.0 and dry-types v0.8.0 (fran-worley)
    • Tring to use illogical predicates with maybe and filled macros now raise InvalidSchemaError (fran-worley)
    • Enable coercion on form.true and form.false (fran-worley)
    • โœ‚ Remove attr (will be extracted to a separate gem) (coop)
    • ๐Ÿ—„ Deprecate required in favour of filled (coop)
    • ๐Ÿ—„ Deprecate key in favor of required (coop)
    • โœ‚ Remove nested key syntax (solnic)

    Compare v0.7.4...v0.8.0