November 2018
Intermediate to advanced
388 pages
9h 5m
English
Data validation is very important in enterprise applications to ensure data integrity. It allows us to check for possible data manipulation between the request made by the user and that received on the server side.
Let's take a look at an example of validating a Bean and writing a unit test to verify it. First, create a maven project:
class Person(@field:NotBlank private val name:String, @field:Email private val emailId:String, @field:NotNull private val preferredLanguage:String)
Let's analyze what we have written for the Person bean. Take a look at how simple this class is. All we have is ...
Read now
Unlock full access