i have a class which is working as the request payload for my api . I need to validate the one of my field "dateOfBirth". Using the javax.validation.past i am checkking the date is not future date but i also want to validate that the date must not be less than 1900-01-01 .
Is there any way using javax.validation api we can do it?
Class Employee{
----
---
@Past(message="date of birth must be less than today")
@DateTimeFormate( pattern="yyyy-MM-dd")
private Date dateOfBirth;
//constuctor
//getter & setter
}