viddl/templates/url-validation.html

14 lines
498 B
HTML

<div hx-target="this" hx-swap="outerHTML">
<label
data-tooltip="{{ if .Valid }}Link is Valid{{ else }}Link is invalid{{ end }}"
>
Link
<input name="URL" id="URL" type="url" hx-post="/valid-link"
aria-invalid="{{ if .Valid }}false{{ else }}true{{ end }}"
required value="{{ .URL }}"
hx-indicator="#url-validation-progress"
>
</label>
<progress class="htmx-indicator" id="url-validation-progress"></progress>
</div>