In this Spring Boot MVC tutorial we’ll see how to validate form fields using standard validation annotations. Form validation is important part of web applications where user input is required so that users can’t enter invalid values. You will also see how to display error messages in front of the field with invalid value so that the user can re-enter input to make it valid. Starter dependencies Starter dependencies that you will be selecting for this Spring Boot form validation example are- spring-boot-starter-web spring-boot-starter-thymeleaf spring-boot-devtools Example uses Thymeleaf templates for view thus the thymeleaf starter. Applications that use spring-boot-devtools will automatically restart whenever files on the classpath change, so you don't have to rebuild and restart the server yourself every time. Maven – pom.xml pom.xml with the above mentioned starter dependencies. <dependency> <groupId>org.springframework.boot</groupId> <artif
Java, Spring, Web development tutorials with examples