How do I validate a changeset without inserting it into a Repo?

I am looking to validate my changeset without inserting it into a Repo. I’m currently just piping into the changeset function, but it appears that @changeset.action and error_tags are empty. How do I validate this changeset without inserting it into a Repo?

I think you want this:
https://hexdocs.pm/ecto/Ecto.Changeset.html#apply_action/2

4 Likes