I do a spring form validation, but I get:
Failed to convert property value of type 'java.lang.String' to required type 'ja
va.util.Date' for property 'birthdate'; nested exception is java.lang.Illega
lStateException: Cannot convert value of type [java.lang.String] to required typ
e [java.util.Date] for property 'birthdate': no matching editors or conversi
on strategy found
However, in my ModelAttribute form, I:
@NotNull
@Past
@DateTimeFormat(style="S-")
private Date birthdate;
I thought DateTimeFormat is responsible for this?
I am using hibernate-validator 4.0.
source
share