These are chat archives for dry-rb/chat

7th
Aug 2016
Terry Appleby
@tappleby
Aug 07 2016 00:38
With dry validation, should this work as expected or did I run into a bug?
required(:question_one)
  .schema(AnswerSchema)
  .when(option?: OPTION_YES) do
    value(:question_two).schema(AnswerSchema)
  end
If I use something like value(:question_two).bool? it will trigger a validation error fine.
ok from comments I see there was ;]
Tim Riley
@timriley
Aug 07 2016 23:22
I was thinking about dry-component becoming dry-system, and I realised that if we make it so we created instances of systems then it would be hard to sort out the auto-injection (since you’re assigning the injector to a globally-accessible constant, which doesn’t mesh well with the idea of system instances)