These are chat archives for dry-rb/chat

18th
Apr 2017
Jeff Dickey
@jdickey
Apr 18 2017 09:21
@pabloh what I'd do is write a mapper class around the validation result you're handed back to give you the symbols rather than strings you want. Since the strings are predictable, parsing and rebuilding should be easy — but beyond the core functionality of the validation class itself
look at the source, figure out what all the strings are, write tests that produce validation errors producing each of those strings and proving that your wrapper does the translation correctly, and then make those tests green.
Piotr Solnica
@solnic
Apr 18 2017 21:39
@pabloh see Result#message_set it returns message objects, you should be able to construct something from this