flash-gordon on master
Fix Constructor custom method d… Merge pull request #402 from ti… (compare)
bin one schema and something that validates
cin another and right now I duplicate the logic for
b. In this case the common attributes are top level, not reused objects like you can nest schemas for (as suggested here http://dry-rb.org/gems/dry-validation/reusing-schemas/).
ain two schemas, you’d like to
Well, mainly looking to understand all the reuse options available because i only know what's in that docs page^
In this case i basically want the equivalence of inheritance and I was unsure if you could do something like that.
c just represent different keys I want to validate. If object A has the
b attributes and object B has A's attributes plus a new one,
c, I'd like to be able to reuse my
dayattributes in multiple places i might like to mixin the
dateschema i've built.
daythough it's likely they'd be in a separate object and i could use the reuse mechanism from the docs
Dry::Validation.Schema(Dry::Validation::Schema, rules: SomeSchema.class.rules + OtherSchema.class.rules)