From bca310525e065cb63eda21876bf34ee370582fd3 Mon Sep 17 00:00:00 2001 From: Philipp Date: Mon, 19 Aug 2024 21:42:40 +0200 Subject: [PATCH] Use validate_acceptance for custom boolean fields Fixes #328 --- lib/keila/contacts/ecto_string_map.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/keila/contacts/ecto_string_map.ex b/lib/keila/contacts/ecto_string_map.ex index 6cec9a1b..adfb65ce 100644 --- a/lib/keila/contacts/ecto_string_map.ex +++ b/lib/keila/contacts/ecto_string_map.ex @@ -210,7 +210,7 @@ defmodule Keila.Contacts.EctoStringMap.FieldDefinition do defp type_validations(_), do: [] - defp required_validations(%{type: :bool, required: true}), + defp required_validations(%{type: :boolean, required: true}), do: [&validate_acceptance(&1, &2, [])] defp required_validations(%{required: true}),