All Versions
46
Latest Version
Avg Release Cycle
178 days
Latest Release
-

Changelog History
Page 1

  • v3.0.0

    🚚 [* Removed Reform::Contract ?] 🚚 [* Move Form#deserializer to Form::deserializer]

  • v2.3.1

    May 22, 2020
    • With dry-validation 1.5 the form is always injected. Just add option :form to access it in the schema.
    • ✂ Removed global monkey patching of Dry::Schema::DSL
    • ✅ Tests in ruby 2.7
  • v2.3.0

    ⬆️ You can upgrade from 2.2.0 without worries.

    • ✂ Require Representable 3.0.0 and removed Representable 2.4 deprecation code.
    • 🔀 Require Disposable 0.4.0 which fixes issues with nil field values, sync {} and dry-validation.
    • 🛠 Fix boolean coercion.
    • 👍 Allow using :populator classes marked with Uber::Callable.
    • 📜 Introduce parse: false as a shortcut for deserialzer: { writeable: false}. Thanks to @pabloh for insisting on this handy change.
    • 📝 Memoize the deserializer instance on the class level via ::deserializer. This saves the inferal of a deserializing representer and speeds up following calls by 130%.
    • 🗄 Deprecated positional arguments for validation :default, options: {}. New API: validation name: :default, **.
    • 🔧 Reform now maintains a generic Dry::Schema class for global schema configuration. Can be overridden via ::validation.
    • When validating with dry-validation, we now pass a symbolized hash. We also replaced Dry::Validation::Form with Schema which won't coerce values where it shouldn't.
    • [private] Group#call API now is: call(form, errors).
    • Modify Form#valid? - simply calls validate({}).
    • In :if for validation groups, you now get a hash of result objects, not just true/false.
    • 👍 Allow adding a custom error AFTER validate has been already called

    Compatibility with dry-validation with 1.x:

    • 👀 [CHANGE] seems like "custom" predicate are not supported by dry-schema anymore or better the same result is reached using the rule method: Something like this:

      validation do
      def a_song?(value)
         value == :really_cool_song
      end
      
      required(:songs).filled(:a_song?)
      end
      

      will be something like:

      validation do
      required(:songs).filled
      
      rule(:songs) do
        key.failure(:a_song?) unless value == :really_cool_song
      end
      end
      
    • 👍 [BREAKING] inheriting/merging/overriding schema/rules is not supported by dry-v so the inherit: option is NOT SUPPORTED for now. Also extend a schema: option using a block is NOT SUPPORTED for now. Possible workaround is to use reform module to compose different validations but this won't override existing validations but just merge them

  • v2.3.0.rc2

    November 02, 2019
  • v2.3.0.rc1

    February 26, 2017
  • v2.2.4

    January 31, 2017
    • You can now use any object with call as a populator, no need to include Uber::Callable anymore. This is because we have only three types and don't need a is_a? or respond_to? check.
    • 👉 Use declarative-option and loosen uber dependency.
  • v2.2.3

    • ➕ Add Form#call as an alias for validate and the Result object.
  • v2.2.2

    November 09, 2016
    • Loosen uber dependency.
  • v2.2.1

    June 21, 2016
    • 🛠 Fix Contract::Properties. Thanks @simonc. <3
  • v2.2.0

    June 20, 2016
    • ✂ Remove reform/rails. This is now handled via the reform-rails gem which you have to bundle.
    • 🗄 For coercion, we now use dry-types as a replacement for the deprecated virtus. You have to change to dry-types' constants, e.g. type: Types::Form::Bool.
    • 👉 Use disposable 0.3.0. This gives us the long-awaited nilify: true option.
    # TODO: fix Module and coercion Types::*