diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 31e8321..56c0dc8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,12 +14,13 @@ jobs: strategy: matrix: include: - - elixir: '1.13' - otp: '23.3' - - elixir: '1.14' - otp: '25' - - elixir: '1.15' - otp: '26' + - elixir: "1.15" + otp: "26" + - elixir: "1.16" + otp: "26" + - elixir: "1.17" + otp: "27" + lint: lint env: diff --git a/.tool-versions b/.tool-versions index 5534480..ce0360e 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -erlang 26.0.1 -elixir 1.15.0-otp-26 +erlang 27.0.1 +elixir 1.17.2-otp-27 diff --git a/lib/formex/builder.ex b/lib/formex/builder.ex index 6fcb620..adddb68 100644 --- a/lib/formex/builder.ex +++ b/lib/formex/builder.ex @@ -29,7 +29,7 @@ defmodule Formex.Builder do wrapper = if struct_module.module_info(:exports)[:formex_wrapper] do - struct_module.formex_wrapper + struct_module.formex_wrapper() else Formex.BuilderType.Struct end diff --git a/lib/formex/utils.ex b/lib/formex/utils.ex index d7f5603..76455c6 100644 --- a/lib/formex/utils.ex +++ b/lib/formex/utils.ex @@ -18,6 +18,6 @@ defmodule Formex.Utils do end def implements?(module, behaviour) do - Enum.member?(module.module_info[:attributes][:behaviour], behaviour) + Enum.member?(module.module_info()[:attributes][:behaviour], behaviour) end end diff --git a/lib/formex/validator.ex b/lib/formex/validator.ex index 3594d20..03c9b34 100644 --- a/lib/formex/validator.ex +++ b/lib/formex/validator.ex @@ -113,7 +113,7 @@ defmodule Formex.Validator do @doc false def translate_errors(form) do translate_error = - form.type.translate_error || Application.get_env(:formex, :translate_error) || + form.type.translate_error() || Application.get_env(:formex, :translate_error) || fn {msg, _opts} -> msg end errors = @@ -129,7 +129,7 @@ defmodule Formex.Validator do @spec get_validator(form :: Form.t()) :: any defp get_validator(form) do - form.type.validator || Application.get_env(:formex, :validator) + form.type.validator() || Application.get_env(:formex, :validator) end @spec valid?(Form.t()) :: boolean