From the course: Spring Web MVC 6
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Test the bean validation flow - Spring Tutorial
From the course: Spring Web MVC 6
Test the bean validation flow
- So just to recap of whatever we have done by far, we added the user controller, added two methods. One for displaying the registration form, the other to save the user data. Then we have a user bean in which we have defined properties and also the constraints for validation along with the error messages. And then the register user HTML where we have bound the properties and also inserted tags to display the error messages, if any, for the particular field. So let's run this flow and find out if everything runs well. And let's go to the home URL first and let's click on the user icon. So that's the registration form. I will not enter anything here and just click on the submit button. There we go. We have all the validation messages right there. Email can't be empty. The email can't be empty, the name can't be empty. The size for the name has to be between one and 20. Gender can't be empty. Date of birth can't be…
Contents
-
-
-
-
-
Understand validation and data binding6m 2s
-
(Locked)
Understand the user registration flow1m 40s
-
(Locked)
Add a Controller to display the HTML form2m 33s
-
(Locked)
Create a user bean and add validation constraints7m 19s
-
(Locked)
Add a Controller method to submit the form5m
-
(Locked)
Bind properties and error messages on HTML8m 1s
-
(Locked)
Test the bean validation flow3m 12s
-
(Locked)
Add a custom validator4m 21s
-
(Locked)
Add InitBinder to register a custom validator1m 50s
-
(Locked)
Understand l10n and i18n3m 10s
-
(Locked)
Add LocaleConfiguration and ResourceBundle file7m 42s
-
(Locked)
Add a save user code10m 1s
-
(Locked)
Link the about template4m 58s
-
-
-
-
-