Felipe Zavan

Results 42 comments of Felipe Zavan

Agreed. To me the ideal interface would be ```js Duration.fromObject({ seconds: 12303 }) .toHuman({ smallestUnit: "seconds", largestUnit: "hours", unitDisplay: "narrow" }) => "3h, 25m and 3s" ``` Which is what...

I monkey-patched `Evaluator` to add `validate` as a proof of concept: ```ruby module Dry module Validation class Evaluator def validate(*args) macros = args.each_with_object([]) do |spec, macros| case spec when Hash...

I forked and created a branch if you want to take a look: https://github.com/dry-rb/dry-validation/compare/main...zavan:dry-validation:macros-within-rule No tests yet and it breaks the existing ones relying on `Contract` doubles, as contract is...

If you're looking to just merge schemas at the top level like myself, looks like you can do this: ```ruby class MyContract < Dry::Validation::Contract params(MyOtherContract.schema, MyThirdContract.new(args).schema) do required(:a).value(:string) end end...

> Project looks abandoned, no activity since 2015 :( Yeah, I just had to use it on a legacy project so I thought I might as well open this PR....

@rafalcymerys Hey! Nope, it's my [second comment](https://github.com/spree/spree/pull/11771#issuecomment-1247968698) on that PR references this issue actually, the CI there is failing due to this issue here.

Whoops... I have created a new PR with this and one more addition, forgot to check if it was already done. https://github.com/trailblazer/trailblazer.github.io/pull/109

I've been using shoulda matchers with trailblazer/reform/rspec like this: ``` ruby describe "the contract" do subject { Product::Create.present(params).contract } it { is_expected.to validate_presence_of :name } it { is_expected.to validate_presence_of :weight...

@musaffa Yeah, it seems to, but I haven't stumbled in any edge cases yet. Right now I'm building a form with a nested collection, something like: ``` ruby class OrderForm...