I am sending a json request in restful API having a date field (java.util.date in the POJO class), apart from other fields
{
"name" : "abcd";
"enrolldate" : "2016-11-28"
}
I have a validator class as well where i am validating all the input parameters. if validation is true, then only response will be received. Else, need to log error. I need to validate the date field in such a way that it always perform a check that the date is always in the format of yyyy-mm-dd. Can anyone please help.