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