Skip to content

Commit

Permalink
Use validate_acceptance for custom boolean fields
Browse files Browse the repository at this point in the history
Fixes #328
  • Loading branch information
wmnnd committed Aug 19, 2024
1 parent 7a73090 commit bca3105
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/keila/contacts/ecto_string_map.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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}),
Expand Down

0 comments on commit bca3105

Please sign in to comment.