mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
require tag to exist on user link creation
This commit is contained in:
parent
93902a19d0
commit
cdc142592a
2 changed files with 2 additions and 1 deletions
|
@ -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()
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue