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.
 
Ad

Advertisements


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

Top