Class: Dry::Validation::Schema::Params

Inherits:
Dry::Validation::Schema show all
Defined in:
lib/dry/validation/schema/params.rb

Constant Summary

Constants inherited from Dry::Validation::Schema

DEFAULT_PROCESSOR_MAP, Form, NOOP_INPUT_PROCESSOR

Instance Attribute Summary

Attributes inherited from Dry::Validation::Schema

#checks, #config, #executor, #input_processor, #input_rule, #message_compiler, #options, #predicates, #rule_compiler, #rules, #type_map

Class Method Summary collapse

Methods inherited from Dry::Validation::Schema

#arity, #ast, #call, clone, create_class, #curry, default_messages, default_options, define, define!, inherited, #initialize, input_processor, input_processor_ast, input_processor_compiler, message_compiler, messages, new, option, options, predicates, registry, rule_ast, rules, set_registry!, to_ast, #to_proc, type_map, #with

Methods included from TypeSpecs

#build_array_type, #build_hash_type, #build_sum_type, #build_type_map, extended, #lookup_type, #resolve_spec

Methods included from PredicateRegistry::PredicateDetector

#method_added

Methods included from StructClassBuilder

#create_class

Constructor Details

This class inherits a constructor from Dry::Validation::Schema

Class Method Details

.configure(klass = nil, &block) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/dry/validation/schema/params.rb', line 7

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