In this example we learn how to create a Spring MVC form with a Textbox. Spring provides the “form” tag library which as simple as HTML form tags. Here we will create a simple Spring mvc form with two textbox and we will add validation support to check if it is not empty and size is between 1 and 5. [Read more…]
In this tutorial we will learn how to validate the Spring MVC application using the Bean Validation ( JSR 303 Bean Validation). We will develop a Spring MVC Form validation constratints for the FirstName,LastName,Emails fields. Once when the user submits the form the server-side validation will be applied and the corresponding Validation messages will be thrown if any.
This requires two important jar files along with other Spring related jars to be added to lib folder