I'm new to Thymeleaf and I have some problems doing simple things...
I was wondering for exemple, in a form, I have a input text and I would like to limited it to only one character long. Is it possible ? Same question, but is it possible to have an input text where the user can only enter number and not characters ? (I don't want an input type=number", I really need something of a text format).
Thanks for your anwers everyone !
Best How To :
- To limit the length of characters that can be entered in the input tag you can you use the maxlength attribute.
Thymeleaf is a Java library. It is an XML / XHTML / HTML5 template engine (extensible to other formats) that can work both in web and non-web environments. It is better suited for serving XHTML/HTML5 at the view layer of web applications, but it can process any XML file even in offline environments. quoted from Thymeleaf homepage
What Thymeleaf is not responsible for is how the user interacts with the html page. For example button clicks, limiting inputs