improvement: Update remaining builtin validators (#244)

Co-authored-by: David Culina <git@omnium.co>
This commit is contained in:
kernel-io 2021-06-02 12:57:13 +12:00 committed by GitHub
parent 35af220d9d
commit dd1474a4f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -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} ->

View file

@ -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

View file

@ -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