Skip to content

v1.3.0

Compare
Choose a tag to compare
@solnic solnic released this 06 Jul 16:18
v1.3.0
b61ffcc

Added

  • Automatic predicate inferring for constrained types! (@flash-gordon)

    Types::Name = Types::String.constrained(min_size: 1)
    
    schema = Dry::Schema.define do
      required(:name).value(Types::Name)
    end
    
    schema.(name: '').errors.to_h # => { name: ["size cannot be less than 1"] }
  • Support for redefining re-used schemas (issue #43) (@skryukov)

Fixed

  • Type container is passed down to nested schemas (@flash-gordon)

Compare v1.2.0...v1.3.0