Validate Request Body using Validation annotations in Spring Boot Rest API
We will implement Spring Boot validate Request Body for Signup Request payload and its nested object:
username
: required and has a size between the specified minimum and maximum.email
: required and valid email format.age
: required and equal or greater than 18.graduationDate
: required and in the past.password
: required and 8 characters long and combination of uppercase letters, lowercase letters, numbers, special characters.address
(nested object): required and its fields are valid.
For more detail, please visit:
More Practice:
Spring Boot Pagination & Filter example | Spring JPA, Pageable
Spring Data JPA Sort/Order by multiple Columns | Spring Boot
CRUD Rest API with Databases:
Exception Handling:
Security:
Spring Boot + Spring Security JWT Authentication & Authorization
Fullstack:
Run both Back-end & Front-end in one place:
mvn spring-boot:run