Due to the nature of my work, I often work with attribute-value matrices (AVMs, or just maps, in the world of Elixir) on which complex constraints are defined. This kind of work I normally do outside of Elixir, since there are dedicated toolchains for that already. However, I was wondering: What if I’d like to do the same work in Elixir? Would it be possible?
So, I started exploring typed AVMs first, which can be modelled quite well as maps validated with the help of an Ecto embedded schema. During validation via changeset, however, it appears to not be possible to define custom constraints, for example dependency constraints such as the value of some field having to be the same as that of another field. Am I getting this right?
If yes, are there otherwise libraries that deal with kind of problems?
If not, is it a desideratum? I could work on that myself.