diff options
Diffstat (limited to 'src/main/resources/templates/articles/new.html')
| -rw-r--r-- | src/main/resources/templates/articles/new.html | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/resources/templates/articles/new.html b/src/main/resources/templates/articles/new.html index afaed02..f5924d6 100644 --- a/src/main/resources/templates/articles/new.html +++ b/src/main/resources/templates/articles/new.html @@ -20,7 +20,7 @@ name="title" th:field="*{title}" placeholder="Yep"> - <p class="text-red-500 text-xs italic">Please fill out this field.</p> + <p th:if="${#fields.hasErrors('title')}" th:errors="*{title}" class="text-red-500 text-xs italic">Please fill out this field.</p> </div> <div class="w-full md:w-1/2 px-3"> <label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2" @@ -33,6 +33,7 @@ name="photoUrl" th:field="*{photoUrl}" placeholder="Doe"> + <p th:if="${#fields.hasErrors('photoUrl')}" th:errors="*{photoUrl}" class="text-red-500 text-xs italic">Please fill out this field.</p> </div> </div> <div class="flex flex-wrap -mx-3 mb-6"> @@ -47,6 +48,7 @@ name="content" th:field="*{content}" placeholder="Doe"> + <p th:if="${#fields.hasErrors('content')}" th:errors="*{content}" class="text-red-500 text-xs italic">Please fill out this field.</p> </div> </div> <div class="flex flex-wrap mb-2"> |
