@DateTimeFormat annotations are necessary both on field and constructor parameter in the immutable form class [SPR-16840] #21380
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
Masatoshi Tada opened SPR-16840 and commented
public class SampleForm {
}
If field's annotation is missing, a value in textbox become "yy/MM/dd" when returning to input view.
If constructor parameter's annotation is missing, a validation error occurs in spite of inputting correct value.
So I have to add annotations to both of field and constructor parameter.
I think this is verbose.
Affects: 5.0.6
Reference URL: https://github.com/MasatoshiTada/spring-mvc-form-sample/blob/master/01-immutable/src/main/java/com/example/immutable/SampleForm.java
Issue Links:
Referenced from: commits 955665b
The text was updated successfully, but these errors were encountered: