Sha256: 0ef5c25905034d43c64e3a52bc55d4966e1fd027f57c36fc688c847a4bae328d

Contents?: true

Size: 444 Bytes

Versions: 8

Compression:

Stored size: 444 Bytes

Contents

require 'dry/validation/schema'
require 'dry/types/params'

module Dry
  module Validation
    class Schema::Params < Schema
      def self.configure(klass = nil, &block)
        if klass
          klass.configure do |config|
            config.input_processor = :params
            config.hash_type = :symbolized
          end
          klass
        else
          super(&block)
        end
      end

      configure(self)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
dry-validation-0.13.3 lib/dry/validation/schema/params.rb
dry-validation-0.13.2 lib/dry/validation/schema/params.rb
dry-validation-0.13.1 lib/dry/validation/schema/params.rb
dry-validation-0.12.3 lib/dry/validation/schema/params.rb
dry-validation-0.13.0 lib/dry/validation/schema/params.rb
dry-validation-0.12.2 lib/dry/validation/schema/params.rb
dry-validation-0.12.1 lib/dry/validation/schema/params.rb
dry-validation-0.12.0 lib/dry/validation/schema/params.rb