diff --git a/lib/ash/resource/validation/match.ex b/lib/ash/resource/validation/match.ex index 327fdcdb..9fd602b3 100644 --- a/lib/ash/resource/validation/match.ex +++ b/lib/ash/resource/validation/match.ex @@ -36,7 +36,7 @@ defmodule Ash.Resource.Validation.Match do @impl true def validate(changeset, opts) do - case Ash.Changeset.fetch_change(changeset, opts[:attribute]) do + case Ash.Changeset.fetch_argument_or_change(changeset, opts[:attribute]) do {:ok, changing_to} -> case string_value(changing_to, opts) do {:ok, changing_to} -> diff --git a/lib/ash/resource/validation/one_of.ex b/lib/ash/resource/validation/one_of.ex index 366869f9..358184ac 100644 --- a/lib/ash/resource/validation/one_of.ex +++ b/lib/ash/resource/validation/one_of.ex @@ -33,7 +33,7 @@ defmodule Ash.Resource.Validation.OneOf do @impl true def validate(changeset, opts) do - case Ash.Changeset.fetch_change(changeset, opts[:attribute]) do + case Ash.Changeset.fetch_argument_or_change(changeset, opts[:attribute]) do {:ok, nil} -> :ok diff --git a/lib/ash/resource/validation/string_length.ex b/lib/ash/resource/validation/string_length.ex index 77717c76..fed212f0 100644 --- a/lib/ash/resource/validation/string_length.ex +++ b/lib/ash/resource/validation/string_length.ex @@ -36,7 +36,7 @@ defmodule Ash.Resource.Validation.StringLength do @impl true def validate(changeset, opts) do - case Ash.Changeset.get_attribute(changeset, opts[:attribute]) do + case Ash.Changeset.get_argument_or_attribute(changeset, opts[:attribute]) do nil -> :ok