Subscribe:
/ @ankit.wasankar
Spring boot video playlist:
• Spring Boot - Beginner to Expert Course
#java #springboot #FormValidation #authentication
Video 04: User Registration and JPA Form Validation - Spring Boot
This tutorial will demonstrate
1. How to make User Registration form and use hibernate validations.
2. Complete working example of User Registration.
-----------------
Important links:
Tutorial link:
https://tutorials.webencyclop.com/spr...
Playlist link:
• Spring Boot - Beginner to Expert Course
-----------------
1. Show registration page to user, using spring controller and view (HTML).
2. Define spring models for database tables.
3.1: Set JPA or Hibernate validations on Spring model - (Server side validations for registration form)
3.2: Set validation error message - (Message to display when validation fails)
4.1: Define Spring Controller for receiving form data after submit.
4.2: Define Spring Service - (Controller will call service method to register user)
4.3: Define Spring Repository - (Service method will call repository method to actually save data to the database)
--------------------
Validations that can be used :
@NotEmpty(message = "*First Name field is mandatory")
@Email(message = "*Email is not valid")
@Length(min = 5, message = "*Password must be at least 5 characters")
@Pattern(regexp = "(^$|[0-9]{10})", message = "Mobile number must be 10 digits")
-------------------