gems dry-schema 1.3.0

latest releases: 1.14.1, 1.14.0, 1.13.4...
5 years ago

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

Don't miss a new dry-schema release

NewReleases is sending notifications on new releases.