fix(Philomena.DuplicateReports.SearchQuery): validate_required in image_changeset

This commit is contained in:
mdashlw 2024-07-20 22:04:14 -07:00
parent 99958ee941
commit 5def18e5f0
No known key found for this signature in database
GPG key ID: 0887AF18569DED32

View file

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