Hibernate Validator Date

S

stunaz

Hello everyone, i am just trying to configure hibernate validator with
different type of data (int,string,date....).
I got a problem with date validation.
The error message is
[javax.validation.UnexpectedTypeException: No validator could be found
for type: java.util.Date at org.hibernate.validator.engine]

i have configure my bean this way :
@Column(name="DATE_BIRTH",nullable = false)
@Past
@Temporal(TemporalType.TIMESTAMP)
@NotEmpty
private Date dateBirth;

and in the controller , in the save Method i use a Validator :
validator.validate(user, result);

but i got that error.
how can make it right, or can give me a link of a use of date
validation with hibernate?
thank for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top