I am in need to use
https://hexdocs.pm/ecto/Ecto.Changeset.html#validate_inclusion/4
The issue I have is that I need to validate a value, which is stored inside a Map (used for Postgres’ JSONB column) while the docs say:
validate_inclusion(t(), atom(), Enum.t(), Keyword.t()) :: t()
meaning the function expects field
to be an atom. I can of course specify appropriate column name as an atom but how does one get the value under specific key validated?