Date validation not working

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Date validation not working




Any idea on how to handle date error.
                               




sitansu
Getting following error while trying to validate date for error handling.

Expression "offerStartDate" is not valid: only variable expressions ${...} or selection expressions *{...} are allowed in Spring field bindings


Below is the code for error handling.


<label for="OfferStartDate">Offer Start Date</label> <input
                                                                                        class="form-control" data-val="true"
                                                                                        data-val-required="OfferStartDate is required"
                                                                                        th:field="*{offerStartDate}" type="date" />Date listed as offer start 
                                                                                       
Date Error