Skip to content

Releases: dry-rb/dry-validation

v1.5.4

21 Aug 08:27
v1.5.4
Compare
Choose a tag to compare

Added

  • You can now pass any key or a path to the rule's key? helper (see #664 for more info) (@alassek)

Fixed

  • Full messages work correctly with rule failures now (issue #661 fixed via #662) (@stind)
  • Providing a custom message template for array errors works correctly (issue #663 fixed via #665) (@tadeusz-niemiec)

Compare v1.5.3...v1.5.4

v1.5.3

27 Jul 11:52
v1.5.3
Compare
Choose a tag to compare

Added

  • You can now access current value's index via rule(:foo).each do |index:| (issue #606 done via #657) (@mrbongiolo)

Fixed

  • Using .each(:foo) works as expected when there are errors related to other keys (issue #659 fixed via #660) (@solnic)

Changed

  • Result#error? is now a public API and it takes into consideration both schema and rule errors (issue #655 fixed via #656) (@PragTob)

Compare v1.5.2...v1.5.3

v1.5.2

14 Jul 08:33
v1.5.2
230138c
Compare
Choose a tag to compare

Fixed

v1.5.1

18 Jun 09:05
v1.5.1
ef98d9e
Compare
Choose a tag to compare

Fixed

  • dry-monads no longer required for the :hints extension (@schokomarie)
  • Using full: true option works as expected with custom rule messages (issue #618 fixed via #651) (@sirfilip)
  • Using locale: ... option works as expected with hints (issue #589 fixed via #652) (@sirfilip)

Compare v1.5.0...v1.5.1

v1.5.0

11 Mar 13:21
v1.5.0
61a5d7f
Compare
Choose a tag to compare

Added

Changed

  • dry-schema dependency was bumped to ~> 1.5 (@solnic)
  • [internal] KeyMap patches have been removed since dry-schema now provides required functionality (@solnic)

Compare v1.4.2...v1.5.0

v1.4.1

08 Jan 18:09
v1.4.1
646545a
Compare
Choose a tag to compare

Added

Fixed

Compare v1.4.0...v1.4.1

v1.4.0

12 Dec 09:08
v1.4.0
8252216
Compare
Choose a tag to compare

Added

  • Support for multi-schema inheritance (@ianwhite)

Fixed

  • Keyword warnings reported by Ruby 2.7 (@flash-gordon)
  • Fixed an issue where MessageSet would be marked as empty too early (@ianwhite)
  • Messages are correctly generated when there are errors for both an array and one or more of its elements (see #599) (@Bugagazavr)

Changed

  • A meaningful exception is raised when failure options are not valid (@MatElGran)
  • [internal] improved performance in Contract.ensure_valid_keys (@grzegorz-jakubiak)
  • [internal] fixed keyword warnings on MRI 2.7.0 (@flash-gordon)

Compare v1.3.1...v1.4.0

v1.3.0

14 Aug 11:46
v1.3.0
0edc45b
Compare
Choose a tag to compare

Added

  • Support for setting an external schema (that can be extended too) (fixed #574) (@solnic)

Fixed

  • Using a hash spec to define rule keys with more than one value is properly handled by rule guard now (fixed #576) (@solnic)

Changed

  • values within rules uses Hash#fetch_values internally now, which improves performance (@esparta)

Compare v1.2.1...v1.3.0

v1.2.1

16 Jul 08:33
v1.2.1
6890f87
Compare
Choose a tag to compare

Fixed

  • Defining an abstract contract class that has no schema no longer crashes (issue #565) (@solnic)
  • Fixed an issue where Rule#each would crash when the value is not an array (issue #567) (@solnic)
  • Fixed an issue where guarding a rule would crash when keys are missing in the input (issue #569) (@solnic)
  • Added missing "pathname" require (issue #570) (@solnic)

Compare v1.2.0...v1.2.1

v1.2.0

08 Jul 20:41
v1.2.0
79430c4
Compare
Choose a tag to compare

Added

Fixed

  • Guarding rules for nested keys works correctly (issue #560) (@solnic)

Changed

  • dry-schema dependency was bumped to >= 1.3.1 (@solnic)

Compare v1.1.1...v1.2.0