From 5def18e5f0bb8921310de8acb908f11d3209abac Mon Sep 17 00:00:00 2001 From: mdashlw Date: Sat, 20 Jul 2024 22:04:14 -0700 Subject: [PATCH] fix(Philomena.DuplicateReports.SearchQuery): validate_required in image_changeset --- lib/philomena/duplicate_reports/search_query.ex | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/philomena/duplicate_reports/search_query.ex b/lib/philomena/duplicate_reports/search_query.ex index bc922077..23525c72 100644 --- a/lib/philomena/duplicate_reports/search_query.ex +++ b/lib/philomena/duplicate_reports/search_query.ex @@ -37,6 +37,16 @@ defmodule Philomena.DuplicateReports.SearchQuery do :image_aspect_ratio, :uploaded_image ]) + |> validate_required([ + :image_width, + :image_height, + :image_format, + :image_duration, + :image_mime_type, + :image_is_animated, + :image_aspect_ratio, + :uploaded_image + ]) |> validate_number(:image_width, greater_than: 0) |> validate_number(:image_height, greater_than: 0) |> validate_inclusion(