diff --git a/lib/philomena/user_links/user_link.ex b/lib/philomena/user_links/user_link.ex index b79ffbf4..48e3ba79 100644 --- a/lib/philomena/user_links/user_link.ex +++ b/lib/philomena/user_links/user_link.ex @@ -52,6 +52,7 @@ defmodule Philomena.UserLinks.UserLink do |> put_assoc(:tag, tag) |> put_assoc(:user, user) |> validate_required([:user, :uri, :public]) + |> validate_required([:tag], message: "must exist") |> validate_format(:uri, ~r|\Ahttps?://|) |> parse_uri() |> put_verification_code() diff --git a/lib/philomena_web/templates/profile/user_link/_form.html.slime b/lib/philomena_web/templates/profile/user_link/_form.html.slime index 0fa3d608..a3dac77a 100644 --- a/lib/philomena_web/templates/profile/user_link/_form.html.slime +++ b/lib/philomena_web/templates/profile/user_link/_form.html.slime @@ -14,8 +14,8 @@ | artist: em artist name here ' or a series name - p Should be blank only if your content isn't on the site, generally = text_input f, :tag_name, value: assigns[:tag_name], class: "input", autocomplete: "off", placeholder: "artist:name", data: [ac: "true", ac_min_length: "3", ac_source: "/tags/autocomplete?term="] + = error_tag f, :tag .field label for="uri"