0
Good people, I need to validate a textarea field in an application using Thymeleaf, to limit the maximum amount I have already managed, but I don’t know how to validate the minimum amount.
0
Good people, I need to validate a textarea field in an application using Thymeleaf, to limit the maximum amount I have already managed, but I don’t know how to validate the minimum amount.
1
I got it, just add minlength=" " with the amount I needed that worked.
<textarea class="form-control" id="inputAnswer" placeholder="Enter Question" th:field="*{answer}" minlength="50" maxlength="255">
<span th:if="${#fields.hasErrors('answer')}" th:errors="*{answer}" th:class="help-block" />
</textarea>
Browser other questions tagged html spring-boot thymeleaf
You are not signed in. Login or sign up in order to post.
How is your code?
– Jonathan de Toni
I did, I thought only add minlength="Qtd" not working directly in HTML, but it worked.
– Everton Bitencourt