Peter Solnica
Peter Solnica
@tomasc I currently have dry-validation in a rails app at work, so it is **very likely** that I will need this feature soon too. If this happens, I'll most likely...
@adam12 I don't mind 🙂 This hasn't changed btw, it's still what needs to be done (more or less)
@flash-gordon @landongrindheim I'm pretty sure there are no examples like that in the documentation but I think the actual problem here is that this code should explode. IIRC this should...
Actually, I may now add it to dry-validation. I need to think about it some more though. If this gets added here, it'll be a plugin. @timriley @flash-gordon what's your...
yeah this should be handled by types, even if we decide to add a `default("foo")` shortcut > not sure what you meant by coercion empty strings to `Undefined` there, though....
I think we want a new type for this. With absent keys we can fill them in for each key that has a default value.
An alternative to using types is to use a callback: ```ruby require 'dry/schema' class Dry::Schema::Macros::DSL def default(value) schema_dsl.before(:rule_applier) do |result| result.update(name => value) unless result[name] end end end schema =...
@irastypain oops, yes I did. Just updated this example. Thanks for spotting it :)
Thanks for reporting this. I'm scheduling the fix for 2.0.0 because it's going to be simpler to do once a couple other improvements are done.
Yes this is a missing feature. Inferrer doesn't support schema key nodes, which may look like this: ```ruby [:age, true, [:constrained, [[:nominal, [Integer, {}]], [:predicate, [:type?, [[:type, Integer], [:input, Undefined]]]]]]]...