added char mins for fields on comments

This commit is contained in:
rawleyIfowler
2022-02-26 11:37:14 -06:00
parent 1d09733e42
commit 2980011a16

View File

@@ -17,9 +17,9 @@
{{ end }} {{ end }}
<h4>Leave a comment!</h4> <h4>Leave a comment!</h4>
<form method="POST" action="/blog/post/comment"> <form method="POST" action="/blog/post/comment">
<input type="text" placeholder="Name" maxlength="50" name="author"/> <input type="text" required pattern=".{3,}" title="Author name must be atleast 3 chars." placeholder="Name" maxlength="50" name="author"/>
<input type="field" placeholder="Comment" maxlength="500" name="content" /> <input type="field" required pattern=".{15,}" title="Your comment must be atleast 15 chars." placeholder="Comment" maxlength="500" name="content" />
<input type="text" style="display: none;" name="url" value="{{ .Url }}" readonly /> <input type="text" required style="display: none;" name="url" value="{{ .Url }}" readonly />
<button type="submit">Post</button> <button type="submit">Post</button>
</form> </form>
</div> </div>