Yet another validation DSL
I’ve been reading my old essays and found this one written in Russian back in 2019.
Essentially, it describes a Ruby gem (library) I had written that allows you to create your own validation DSL as a bunch of functions and data. It emphises simplicity and flexibility. I thought it had a really interesting idea behind it so I’m going to rehash it here.
The below can be applied to any language (admittedly, it’ll be less convenient in some). I wrote examples in Ruby and Clojure.