You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but we get TypeError: no implicit conversion of Symbol into Integer from /usr/local/bundle/gems/dry-schema-1.5.6/lib/dry/schema/message_compiler.rb:119:in []'
seems like messages.translate returns array rather than hash with :meta key.
To Reproduce
class BaseContract < Dry::Validation::Contract
config.messages.backend = :i18n
end
class TestContract < BaseContract
params do
config.validate_keys = true
required(:test).filled(:string)
end
end
Describe the bug
While using i18n backend
config.validate_keys = true
doesn't work as expected, because we're trying to callbut we get
TypeError: no implicit conversion of Symbol into Integer from /usr/local/bundle/gems/dry-schema-1.5.6/lib/dry/schema/message_compiler.rb:119:in []'
seems like messages.translate returns array rather than hash with
:meta
key.To Reproduce
Expected behavior
It doesn't fails with error and returns failed validation with a correct message.
My environment
The text was updated successfully, but these errors were encountered: