AntlUtilsEcto.Changeset.errors_on

You're seeing just the function errors_on, go back to AntlUtilsEcto.Changeset module for more information.

Specs

errors_on(Ecto.Changeset.t()) :: %{optional(atom()) => [binary()]}

A helper that transforms changeset errors into a map of messages.

Examples

iex> changeset = Ecto.Changeset.change({%{}, %{password: :string}}) |> Ecto.Changeset.cast(%{password: 123}, [:password]) iex> assert "is invalid" in AntlUtilsEcto.Changeset.errors_on(changeset).password iex> assert %{password: ["is invalid"]} = AntlUtilsEcto.Changeset.errors_on(changeset)