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

Forum statistics

Threads
473,982
Messages
2,570,189
Members
46,735
Latest member
HikmatRamazanov

Latest Threads

Top