I am working on a Spring REST application.
In that I have a REST Controller like this
@RequestMapping(value = "/patient", method = RequestMethod.POST)
public BloodPressureDTO store(@RequestBody BloodPressureDTO bloodPressureDto) {
.........
}
The BloodPressureDTO
object has a Date
object inside it.
I need to validate the Date
object.
If the JSON that is posted in the request has an invalid date format, then I would like to handle that situation.