Hash_type setting versus type_spec strange behavior


#1

Hi,

I noticed some weird behavior. As far as I understood

However the hash_type settings only seems to work when the type_specs settings is enabled. As shown in the example below the symbolized type seems to be ignored…

require 'dry-validation'
a = Dry::Validation.Schema do
  configure do
     config.hash_type = :symbolized
     config.input_processor = :sanitizer
     config.type_specs = true
  end

  required(:test, :string) { filled? }
end
puts a.call({'test' => 'kljkl', 'whatever' => 'jkll'}).errors
===> {}

while

require 'dry-validation'
a = Dry::Validation.Schema do
  configure do
     config.hash_type = :symbolized
     config.input_processor = :sanitizer
  end

  required(:test, :string) { filled? }
end
puts a.call({'test' => 'kljkl', 'whatever' => 'jkll'}).errors
===> {:test=>["is missing"]}

Is this intended behavior?