dry-bot on master
[devtools] sync (compare)
timriley on master
Fix changelog (compare)
dry-bot on master
[devtools] sync (compare)
timriley on master
Add changelog entry for 0.19.0 … (compare)
timriley on add-0-19-0-changelog
def initialize(params, options)
@options = options #this is the dependency hash
end
Schema#output
do?
validation = schema.call(params)
validation.success? ? validation.output : validation.messages
form.sync
User.new(schema.call(some_data_from_api))
<= just this
UserSchema = Dry::Validation.JSON do
required(:created_at).value(:date_time?)
end
class User < Dry::Struct
attribute :created_at, Types::Strict::DateTime
end
user_attrs = UserSchema.(user_data)
User.new(user_attrs)