• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
  • Tim Holloway
  • Carey Brown
  • salvin francis

modification for chapter 12 validatingEntity

Ranch Hand
Posts: 1749
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, in order validate the birthday of the employee is in the past using @Valid, the code has to be modified:

If you input 118 for the year, born in 2018, you will get

Validation failed. ConstraintViolations: [ConstraintViolationImpl{interpolatedMessage='must be in the past', propertyPath=info.dob, rootBeanClass=class examples.model.Employee, messageTemplate='{javax.validation.constraints.Past.message}'}]

A day job? In an office? My worst nightmare! Comfort me tiny ad!
create, convert, edit or print DOC and DOCX in Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!