Need help creating a changeset function with multiple fields check both from database and changeset

There’s a specific function to do this - Ecto.Changeset.get_field/3