solnic on master
Clear exception message when an… Add gem names to plugins Merge pull request #128 from sk… (compare)
flash-gordon on declare-finalized
flash-gordon on master
Set initial value for ivar Merge pull request #131 from dr… (compare)
flash-gordon on declare-finalized
Set initial value for ivar (compare)
require 'dry-validation'
base = Dry::Validation.Schema do
key(:name).required
key(:email).required
end
json = Dry::Validation.Schema(base) do
configure { config.input_processor = :json }
end
form = Dry::Validation.Schema(base) do
configure { config.input_processor = :form }
end
Dry::Validation.Form|JSON
should work too, something to improve…
Types::Form::Int
, Types::Coercible::Int
in my document type definition
Types::Maybe::Strict::Int
and Types::Maybe::Coercible::Int
in the docs
class House < Dry::Types::Struct; include Addressable; .... end
constructor_type(:schema)
to be set for optional types with default values to be set when sth is missing