Dry Validation Versions Save

Validation library with type-safe schemas and rules

v1.10.0

1 year ago

This release is mostly about upgrading to dry-core 1.0 and dry-configurable 1.0. One of the outcomes is dropping dependency on dry-container (because it was moved to dry-core). If you happen to use dry-container, please switch to Dry::Core::Container.

Changed

  • Upgraded to the latest versions of dry-{core,configurable,logic,types} (@flash-gordon + @solnic)

Compare v1.9.0...v1.10.0

v1.9.0

1 year ago

Fixed

  • Duplicated keys mishandling in rule evaluation (issue #676 fixed via #711) (@mereghost)

Changed

  • Use Zeitwerk for auto-loading (via #715) (@solnic)

Compare v1.8.1...v1.9.0

v1.8.1

1 year ago

Fixed

  • Raise an InvalidKeyErrors on substring of valid keys (issue #705 fixed via #706) (@MatElGran)
  • Using rule(:arr).each { .. } doesn't crash when :arr turns out to be nil (issue #708 fixed via #709) (@bautrey37)

Compare v1.8.0...v1.8.1

v1.8.0

2 years ago

Added

  • New rule helper base_rule_error? which checks if there's any base error set (via #690) (@wuarmin)

Changed

  • Dependency on dry-schema was bumped to 1.9.1 (@solnic)

Compare v1.7.0...v1.8.0

v1.7.0

2 years ago

Changed

  • [internal] Upgraded to new setting API provided in dry-configurable 0.13.0 (@timriley in #686 and 3f8f7d8)
  • Bumped dry-schema dependency to 1.8.0 (in part, to ensure dry-configurable 0.13.0 is available) (@timriley)

Compare v1.6.0...v1.7.0

v1.6.0

3 years ago

Added

  • You can now pass a key name or path to rule_error? predicate (issue #658 closed via #673) (@moofkit)
  • You can now pass initial context object to Contract#call (issue #674 via #675) (@pyromaniac)

Fixed

  • Checking key? within a rule no longer crashes when value is nil or an empty string (issue #670 fixed via #672) (@alexxty7)

Compare v1.5.6...v1.6.0

v1.5.6

3 years ago

Fixed

  • Dependency on dry-schema was bumped to >= 1.5.1. This time for real (@solnic)

Compare v1.5.5...v1.5.6

v1.5.5

3 years ago

Fixed

  • Dependency on dry-schema was bumped to >= 1.5.2 (see #666 for more info) (@artofhuman)

Compare v1.5.4...master

v1.5.4

3 years ago

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

3 years ago

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